This site requires JavaScript, please enable it in your browser!
Greenfoot back
-nic-
-nic- wrote ...

2012/4/11

delay script

-nic- -nic-

2012/4/11

#
how would you delay some script
SPower SPower

2012/4/11

#
The entire scenario or just one class?
-nic- -nic-

2012/4/11

#
is it possible to delay a small section of code??
SPower SPower

2012/4/11

#
Yes, I did that with my Jump! scenario (after a few seconds when the arrow was added, the monster will be added). I used an instance variable for that, called delay. In act(), I said delay++. I also did this in act:
if (delay == 100) {
....here I did something.....
}
I hope this helps
-nic- -nic-

2012/4/11

#
clever a bit like a life meter nice :)
You need to login to post a reply.