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

2018/12/16

how to make power ups

Mustafa405 Mustafa405

2018/12/16

#
how would i make power ups that once an object is removed it would change the actor who got the power up.
danpost danpost

2018/12/16

#
Mustafa405 wrote...
how would i make power ups that once an object is removed it would change the actor who got the power up.
What have you tried or what do you think is a good way to go about it?
Mustafa405 Mustafa405

2018/12/16

#
i think you would need an if statement so when the object is removed you would remove the actor and replace it with another one but i don't know how to make that condition or a if statement
danpost danpost

2018/12/16

#
Mustafa405 wrote...
i think you would need an if statement so when the object is removed you would remove the actor and replace it with another one but i don't know how to make that condition or a if statement
Is the powerup to be used to change one type actor to a totally different type (like a whale into a bowl of petunias)? or, is to used to change some state (image, speed, or some ability) of the actor acquiring the powerup?
Mustafa405 Mustafa405

2018/12/16

#
danpost wrote...
Mustafa405 wrote...
i think you would need an if statement so when the object is removed you would remove the actor and replace it with another one but i don't know how to make that condition or a if statement
Is the powerup to be used to change one type actor to a totally different type (like a whale into a bowl of petunias)? or, is to used to change some state (image, speed, or some ability) of the actor acquiring the powerup?
i would like to change the actor completely but if its too much work i would like to change its size or speed at the least
danpost danpost

2018/12/16

#
Mustafa405 wrote...
<< Quote Omitted >> i would like to change the actor completely but if its too much work i would like to change its size or speed at the least
Alright. Either way is possible. Easiest may be to just go ahead a replace one actor with one of a different type (especially if the image changes also -- apart from scaling). The isTouching method is sufficient for the if condition. And, add the new actor into the world before removing the old one, so as not to lose reference to the world. Size and speed are, however, only states of an actor that can be changed without introducing a new type actor.
Mustafa405 Mustafa405

2018/12/16

#
i have a question if i use the isTouching method once i move from the object will the actor return to normal or will it stay as the new actor edit:nevermind
You need to login to post a reply.