Actor free roam movement

rjacomenrjacomen Member, PRO Posts: 19
Ok, I am refreshing my memory on working with actors. I do not want to develop a game with actors, I need to develop an assessment. I need a few things to happen. I have an actor that just needs to move freely on the screen. it can hit invisible walls and just keep bouncing around at a slow rate. If a user touches the actor it spawns another actor in it's place, which I figured out just fine. But I also need it to explode after hitting a certain keyboard key. I am asking for help with allowing actors to move freely. Once I figure that out, I would need it to explode, which I think I saw some videos on that. This is actually being designed for people with disabilities. Any help would be great. Thank you

Comments

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    edited June 2013
    Put a 'Change Velocity' behavior into the spawned actor. Set the direction to: random(0,359)
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    What RThurman says, and to explode it when touched I'd spawn a particle effect explosion and destroy the actor.
  • rjacomenrjacomen Member, PRO Posts: 19
    Thanks guys, so far so good. I have the ball moving freely using random. When I move the mouse over the ball it spawns a smiley face. If I move the mouse over the smiley face it destroys the smiley face and spawns a boom image. Is there a way to have it change image when the mouse is on the ball (change to the smiley face), but if I remove the mouse from the changed image it goes back to the original image? Again, thank you guys, exremely helpful
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Rule:
    -When mouse is inside:
    --Change Image.
    ---Otherwise:
    --Change image to regular image.
  • rjacomenrjacomen Member, PRO Posts: 19
    Everything you guys have posted is perfect and working great. My final question, and sorry to bother. After the explosion I need the scene to restart automatically. The order of interaction, ball moving, mouse over to change to smiley face, mouse over and key a letter, spawn explosion destroy character, now I need it to automatically restart after the explosion and destroying of the character.
    Again, you guys rock, thanks for your help.
  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375
    To restart the scene just drag the Reset Scene behavior into the last rule, below all of the other behaviors.
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Keep in mind when using the Reset Scene Behavior, you may need to manually reset some of your Attributes as well.
  • rjacomenrjacomen Member, PRO Posts: 19
    I placed the reset scene after destroy behavior, which is sitting in my main rule, but it than skips the rule of exploding and resets, which is what I wanted, but not to skip the explosion part. Should I create a separate rule for explosion and than have reset at the end of that rule? A rule for switching from ball to smiley, a rule of switching from ball to explosion
  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375
    no, just add a timer. After X amount of seconds, reset scene.
  • rjacomenrjacomen Member, PRO Posts: 19
    Thanks everyone, looks like it's working exactly as you helped me with. Much appreciated. I'm sure I'll hit you up with more later.
Sign In or Register to comment.