Receiving activation events from 'clones'

Non-platform specific questions.

Receiving activation events from 'clones'

Postby mal99 » Tue Jul 05, 2011 1:46 pm

Back in 2007, someone asked:“Is it possible to receive an activation event from any clone of an actor, because when I just select the actor, it just turns into actor.0 (clone 0)?” The answer then was NO. Has that changed?

I just hit the same problem with groups of identical actors with the same parent (which the receiving actor seems to treat as clones). Activation events are sent to the receiving actor when each of the identical actors is in a collision that destroys it. But, the receiving actor only accepts the first activation event - after that it ignores events sent when the other identical actors are destroyed.

Anyone got a solution or work-around?

Thanks
mal99
 
Posts: 10
Joined: Tue May 31, 2011 11:47 pm
Score: 0 Give a positive score

Re: Receiving activation events from 'clones'

Postby Game A Gogo » Tue Jul 05, 2011 6:57 pm

I think if you do it in the script editor you can then change the actor.0 to actor, then that would work
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Receiving activation events from 'clones'

Postby mal99 » Thu Jul 07, 2011 1:51 pm

Guess I need to learn a lot more about scripting to go forward - can't even see a 'Receive Activation' function in the Script Editor menu (or maybe I just need better eyesight)!

Can you recommend a scripting tutorial or something to help get up to speed on scripting?

Thanks
mal99
 
Posts: 10
Joined: Tue May 31, 2011 11:47 pm
Score: 0 Give a positive score

Re: Receiving activation events from 'clones'

Postby jimmynewguy » Thu Jul 07, 2011 2:09 pm

I believe you were mislead before when you read that you cannot pick what clone the activation event comes from.

Right click the actor you want to receive the activation event, click actor control, click Events: Add, Activation Event, from actor, click the plus sign next to the actor giving the event, and then click the clone number. I'm sure you know most of that though just making sure were on the same page :) Then simply add what you want to happen.

But if you're still having problems with this (or you don't have the clones created in the editor, and therefore cannot choose them) then you can always set a variable called something like act set to equal the cloneindex when the actor that is sending the event sends it. Then choose activation event from that general actor -> script editor -> if act == the cloneindex of the actor you want, do the action. If you catch my drift.

Just ask if I'm confusing you or tell me to leave if I'm not helping :) or if you're still having problems.
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest