Spawning Actors

disparitiondisparition Member Posts: 32
edited April 2012 in Working with GS (Mac)
hello, i have an actor that every .01 s spawns another actor(2) above it and every .01 s actor 2 destroys itself so it looks like actor1 and actor2 are just only one actor, the problem is that if i put 2 actors1 in scene the second actor will spawn an actor2 and that actor will not destroy itself and i cant understand why is it happening, if you have an idea what this is happening i would appreciate your opinion, thank you.
i can send the file also so you can check it

Best Answers

  • pinata14pinata14 Posts: 150
    Accepted Answer
    something like this happened to me too. Tshirtbooth just told me to use use particles instead of actors and it worked great because there were too many actors being spawned. I dont understand why you cant just have actor2 be constant though lol
  • pinata14pinata14 Posts: 150
    Accepted Answer
    im confused, actor 1 is the player? and he tries to jump on top of actor2? and when he does what happens to both of them (what do you want to happen).
  • pinata14pinata14 Posts: 150
    Accepted Answer
    were you trying to accomplish something like this?
    https://www.yousendit.com/download/M3BsVWRrdkczS28wTWRVag
  • pinata14pinata14 Posts: 150
    Accepted Answer
    Ok, so you can instead of every .01 seconds just have one protection that follows actor 2, or is this a conflict?
  • pinata14pinata14 Posts: 150
    Accepted Answer
    (in protection)
    constrain attribute self position x to actor2 position x
    constrain attribute self position y to actor2 position y + (however far above the actor 2 you want it to be)

Answers

  • disparitiondisparition Member Posts: 32
    can you make the actors collide with the particles?
  • disparitiondisparition Member Posts: 32
    because what i am trying to do is this; i have my actor1 and when it collides in the left and right side with actor2 both actors just change their direction to the opposite direction, thats not the problem, the problem is that when actor2 jumps and lands on the head of actor1 they stick together (even if i put them to collide with each other) and because they are touching they keep changing directions but none of them move, so what i need is something that when actor1 lands on the head of actor2, actor1 will bounce
  • disparitiondisparition Member Posts: 32
    its something similar to mario bros, when mario jumps on the head of the turtle the turtle dies, but when mario touches the turtle from the side mario dies
  • disparitiondisparition Member Posts: 32
    edited April 2012
    you cannot control the actors, the only direction that the actors have is right and left, so lets say
    when ;

    "actor1" ---is going right---> collide(they do not bounce) <-----is going left--"actor2"

    "actor1"><"actor2"

    <------- "actor1" "actor2"---------->

    ok thats easy i can do that, but sometimes i have like trampolines in the floor so when "actor1" or "actor2" hits them, they jump and sometimes "actor1" or "actor2" lands on the other one, and when this happen they stick together because they are constantly touching each other so they do not move, what i was trying to do is to spawn a "protection" over the head of each actor so when (it can be otherwise as well) "actor1" is going to land on "actor2", instead of "actor1" touching "actor2" it touches the "protection" and "actor1" bounces of the "protection" so it does not stick with "actor2"

    and thank you for trying to help me i appreciate it
  • disparitiondisparition Member Posts: 32
    no that will be great, the only thing is that i dont know hoe to make the "protection" follow "actor2" but if you can tell me that will be great, thank you
  • disparitiondisparition Member Posts: 32
    ok thank you very much
Sign In or Register to comment.