A question...
aeroblaster4
Member Posts: 7
If I wanted to make it so that an actor destroys another actor, but only if the first actor is going a certain speed, how would I go about doing this?
Also, how would I give an object health, such as a block that needs destroying, but requires multiple hits.
Also, how would I give an object health, such as a block that needs destroying, but requires multiple hits.
Comments
then create a rule, say "if oblect collision blah blah, then put "change attribute: self.Health to self.Health -1
then create another rule that says if attribute self.Health =0 then delete
Anyone have any ideas about the first bit though?
Please read through the Rules/Guidelines sticky it will explain why using a titles for topics like, Help, a Question, Please anyone, etc… need to be avoided. That title is probably a good reason why you have not received many replys to your question.
No for your question number 1
you can create a game boolean attribute we'll call it destroyspeed
Lets call the actor getting destroyed Actor 1 and the actor doing the destroying actor 2
In actor 1 you will need a rule
When Actor Overlaps or Collides with Actor 2
AND game.destroyspeed is true
--Destroy Actor
Then in actor 2 have a rule
If self.linear velocity .x > 100
--Change Attribute game.destroyspeed to true
Otherwise
Collide with actor 1
(That Rule will make actor 2 destroy actor 1 if moving faster than 100 and if below it will bounce off)
I hope that helps there several ways you could modify that to get different results So hopefully that will get you in the right direction.
Oh and don't forget to check out the Rules and Guidelines Sticky. There is good stuff in there
_______________________________________________________________
AppSolute Entertainment on Facebook