Activation Event to all clones

Game Editor comments and discussion.

Activation Event to all clones

Postby jimmynewguy » Tue Apr 22, 2008 9:29 pm

Is there a way to send an activation event to an actor and all its clones, like how ever many are there at the moment because the number will increase or decrease throughout the game :lol: I know its confusing so if you dont understand i can further explain :D thnx :mrgreen:
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

Re: Activation Event to all clones

Postby DST » Wed Apr 23, 2008 5:01 am

just pass a variable instead. Normally I have a control actor that takes care of most things...send the activation event to him, and have him direct the actors.

As in ActivationEvent> DestroyActor("Actorname");

all actors with that name will be affected.

Just out of curiosity, what were you wanting the clones to do?
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Activation Event to all clones

Postby jimmynewguy » Thu Apr 24, 2008 2:13 am

I want the clones to move to the mouses position if they are "selected" ( :roll: RTS :roll: ) its a chalange but it helps my coding experience
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

Re: Activation Event to all clones

Postby DST » Thu Apr 24, 2008 4:11 am

Well if they are like, say, puzzle pieces....You can simply add an event "mousebuttondown", choose 'enable drag' from the list in the mousebuttondown window, and add a script editor containing nothing but //
Now you can click and drag the object around.

there are other ways...it depends on what selection method you are using for selecting the clones....
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Activation Event to all clones

Postby jimmynewguy » Fri Apr 25, 2008 7:47 pm

Sending it to "Actor" doesn't work, i need all its clones, :| I'm probably just confusing you, here ill explain
you have a filled region "area" and three actors "human" mouse button down on area<send activation event to all clones of human
then on human<activation event from area<if select = 1<move to mouse position :mrgreen:
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

Re: Activation Event to all clones

Postby DST » Sat Apr 26, 2008 6:21 am

This is a hard question to answer because i'm still not sure what you want to do. In programming there are 10 ways to do everything but their results vary slightly.

Here's what i mean:
When you click the selection area, do you want only the clones inside that area to come to the mouse, or all clones everywhere?
Are the clones allowed to move to the mouse in any other way than clicking selection? What are the clones doing when they're not moving to the mouse? What are the clones doing when they're not in the selection region?
You say only its clones...is there a human.0 that you don't want to move to the mouse?
Do they need to stop when meeting each other? If not, they'll all pile up under the mouse and you'll only be able to see the top one.

For instance, I had no problem making them all come running, by using this:
Code: Select all
MoveTo("actorname", xmouse, ymouse, 10, "view", "");

On mousebutton down in filled region.

But I have a feeling that there are more selection rules to be met before a clone qualifies, right?
I know this seems less than helpful, but the more I code the more I desire the script to be 'the quickest route between two conditions'. I try not to 'rig' things anymore, but in order to do it, I have to have a clear picture of what i want to do, and the rules that surround that action.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Activation Event to all clones

Postby jimmynewguy » Sat Apr 26, 2008 8:45 pm

ok cut,dry, and simple;
I want the clones of human to move to the mouse location on mouse button down, but ony if they are selected :mrgreen:
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

Re: Activation Event to all clones

Postby DST » Sun Apr 27, 2008 2:20 pm

I can only assume that this would be used for a game along the lines of Age of Empires.....
So here is a demo that does this. Its not the best way as it requires draw actor events, and it might get bogged down if you had >100 humans onscreen, but like i said...it all depends on how ur using it, and the rules of ur game.

Click on an actor to select him, click again to deselect him.

Once selected, click anywhere to make him(them) move there.

I'm also investigating a more complex method but i'm not there yet so see if this one works for you.
Attachments
ActorSelect.zip
(3.04 KiB) Downloaded 108 times
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Activation Event to all clones

Postby jimmynewguy » Mon Apr 28, 2008 7:29 pm

thanx for sticking with me and understanding points ++ :D :lol: :mrgreen:
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

Re: Activation Event to all clones

Postby DST » Tue Apr 29, 2008 5:50 pm

Glad I could help!
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron