You must be logged in to post messages.
Please login or register

Scenario Design
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Infinite unit patrols with infinite waypoints with one trigger
posted 07 September 2005 04:48 PM EDT (US)   
Many people like to have their npcs (non-player characters in rpgs) to walk about between waypoints. For example, having a shopkeeper walk to the back of the shop and back as if restocking, or a villager walking around a town.

This can be done by creating a trigger with a timer and effects that moves the unit to a waypoint and fires the trigger that will be the next waypoint. For each unit this can take a lot of triggers. I have an idea that will use just one trigger for all your npcs and all their waypoints.

I will describe how it works for one npc, to keep the description simple. First, place flying units as waypoints. Shrink the flying units so they are not visible. Then make a trigger with a timer, as usual.

The effects of this trigger will be 'move to unit'. The npc will move to a flying unit (waypoint), whilst that flying unit will move to the second flying unit, and so on, so the final flying unit will be moving to the npc. Loop the trigger and away you go.

The effect of this will be that the npc will move to waypoint after waypoint endlessly, just like the old system.

Of course, any amount of npcs can use this one trigger.

The irony is that a scenario will work better with the old system, since more units lag but more triggers don't. Ah well, I still think it's good.

Replies:
posted 07 September 2005 05:02 PM EDT (US)     1 / 19  
lol

Edit: Nice thinking .

[This message has been edited by Grün (edited 09-07-2005 @ 05:02 PM).]

posted 07 September 2005 06:52 PM EDT (US)     2 / 19  
yeah very nice thinking, have you tested it?

[This message has been edited by battlestar000 (edited 09-07-2005 @ 06:52 PM).]

posted 07 September 2005 06:57 PM EDT (US)     3 / 19  
I haven't tested it, but I don't see why it wouldn't work.

By the way, along these lines has anyone thought of a conga line of npcs? Just for giggles, like.

[This message has been edited by greyshark (edited 09-07-2005 @ 06:58 PM).]

posted 07 September 2005 07:09 PM EDT (US)     4 / 19  
lol, that would be funny.

oh you can wait for what I can give
you know what I am so you know how I live
try to look proud but you’re not in the slightest
its happening now and it’s always been like this.
posted 07 September 2005 07:17 PM EDT (US)     5 / 19  
sometimes the editor's whacky, so nothing could be said for sure without some form of testing.

and ditto about the congo line.

posted 07 September 2005 08:04 PM EDT (US)     6 / 19  
The player could be the person at the head of the conga line.
posted 07 September 2005 09:09 PM EDT (US)     7 / 19  
this just made me envision an rpg with a long congo line following the main char, wherever he goes, lol.
posted 07 September 2005 09:37 PM EDT (US)     8 / 19  
that... would... be... AWSOME! I will make it rightaway!

oh you can wait for what I can give
you know what I am so you know how I live
try to look proud but you’re not in the slightest
its happening now and it’s always been like this.
posted 08 September 2005 03:57 AM EDT (US)     9 / 19  
Nice idea. I made a similar think some weeks ago when I was working on the 4th map of my incoming campaign to make an enemy ballista bombing a human player fortress. In fact the target of this military engine was not a static object but a pegasus make smaller that continued patrolling an area that had to be bombed. In this way the missiles of the ballista reached different and random points of the stronghold. Unfortunately this system works well only with 2 ballistas otherwise the game will lag like hell (at least on my comp)...

RAF The Dragon Cult Empires Fallen City AOM TT SCIPIO 1.1 LOTB The Lost Legion The Guardians Adventurers 1&2&3
Proud member of no ****ing clan
_
_|_|_
|_|_|_|
|_|

rest in peace Compy (February 2001, May 2006)
Scenario Editor Screens
posted 08 September 2005 06:16 AM EDT (US)     10 / 19  
very nice idea greyshark.

regards


the Elder
"imagination is more important than knowledge."
Albert Einstein
posted 08 September 2005 06:22 AM EDT (US)     11 / 19  
@Oscar, Another idea is to have the pegasus following the player. The timer for the 'following' trigger means the pegasus will be lagging behind the player as he is moving, but at the player when he is still.

This gives the effect of the ballista being slow at aiming at the player.

posted 08 September 2005 09:53 AM EDT (US)     12 / 19  
and that has been the basis for many dodgable spells in my upcoming rpg.

[This message has been edited by battlestar000 (edited 09-08-2005 @ 09:53 AM).]

posted 09 September 2005 09:43 AM EDT (US)     13 / 19  
I've just tried out the conga line idea. Everyone behind the collosus got lagged behind because he was walking so slowly, Ornlu the wolf kept wanting to turn back, and the walking palm and wadjet didn't even know they were even in a conga line. Ah well, I think Kronos was having a good time though.

It was going well until I wanted to go home. The conga line followed me all the way home and then into my bathroom. It's been 9 days now and they're still always behind me. I've tried crossing busy streets to kill 'em off but only the monkey got run over and I quite liked him. Any ideas?

[This message has been edited by greyshark (edited 09-09-2005 @ 10:27 AM).]

posted 09 September 2005 01:47 PM EDT (US)     14 / 19  
lol that's quite good.

If some of the units kept wanting to turn back, you might want to use a condition "unit distance >=1" with the looped effect of move to unit.

posted 09 September 2005 03:17 PM EDT (US)     15 / 19  
I think the conga line would be greatly improved if the units were to stop when they reach their unit, instead of clambering around their unit in an attempt to get to the exact spot their unit is standing in.

I suppose this could be done with 2 triggers for each unit, conditions unit distance <1 and unit distance >=1.

Anyway, that's enough about conga lines now, eh?

posted 10 September 2005 02:24 PM EDT (US)     16 / 19  

Quote:

whilst that flying unit will move to the second flying unit, and so on, so the final flying unit will be moving to the npc.

I'm not sure what flying units you're talking about, but if you use gaia birds (e.g. vulture), you don't need them to move to one another. Birds always patrol the map randomly.

So, just one bird, and one looping trigger per unit: move [insert unit here] to [insert bird here]. A condition "timer 30 seconds" will reduce the lag and still look good.

For other units you can use the same bird, but different timers - this way it won't look like they all follow the same bird. Or you can use several birds - one bird per unit.

posted 10 September 2005 05:45 PM EDT (US)     17 / 19  
@Archaeopterix, I don't think you quite understand. What would happen is on the first run of the trigger, the npc will move to the spot that the first flying unit is currently in (i.e. the first waypoint). At the same time, the first flying unit will move to the spot that the second flying unit is in (second waypoint). Also, note that the flying unit at the final waypoint moves the spot currently occupied by the npc (the start/final waypoint). On the trigger's next run, the npc and flying units all change places again.

Imagine a conga line where there is no end to it, it is a circular conga line. This is what the system is. Now if you imagine that only one of these people is visible, it would look as though that person is moving round in a circular pattern, but definitely not following anyone. I hope this analogy helps you understand.

Quote:

I'm not sure what flying units you're talking about


I didn't want to specify a specific flying unit, because that may cause confusion in that people may believe only the specified flying unit can be used. Any flying unit can be used.

Quote:

but if you use gaia birds (e.g. vulture), you don't need them to move to one another. Birds always patrol the map randomly.


Good point. This would make the npc wander about the map aimlessly though; my idea was to give them waypoints to move to so their movement is controlled.

Quote:

For other units you can use the same bird


This would look a bit pathetic to be honest, having a group of npcs all walking in the same direction and jostling to be in first place.

Thanks for reading.

posted 10 September 2005 06:07 PM EDT (US)     18 / 19  
Yeah I completely understood your idea, but I gave a suggestion to - imo - improve it. Because you still need several flying units for one unit, and do triggers for all of those. Besides, it won't look 'random' at all: it'll look like a boring circular motion.

So, instead of this, just use a gaia bird and use that as your waypoint.

Quote:

This would look a bit pathetic to be honest, having a group of npcs all walking in the same direction and jostling to be in first place.

And that's why I said:

"For other units you can use the same bird, but different timers - this way it won't look like they all follow the same bird."
You see, because at different times, the birds (waypoints, in this case) are at different spots. Thus with different timers, units will walk to different locations, and only sometimes they will walk to approximately the same area - which looks natural.

Quote:

I didn't want to specify a specific flying unit, because that may cause confusion in that people may believe only the specified flying unit can be used. Any flying unit can be used.


Allright, I just wanted to make sure that you DIDN'T mean gaia birds (e.g. vulture).

Quote:

This would make the npc wander about the map aimlessly though; my idea was to give them waypoints to move to so their movement is controlled.


Yep in that case your solution is better (but nearly as much work as the old system, and without the extra units). Anyway, I always love randomised things
posted 13 September 2005 06:26 PM EDT (US)     19 / 19  
I've just had a bloody good thought. If one were to teleport one of the flying units (waypoints) to a new position, then this new waypoint would be accepted. What I'm saying is that an advantage of my system is that waypoints can altered ingame.
Age of Mythology Heaven » Forums » Scenario Design » Infinite unit patrols with infinite waypoints with one trigger
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Mythology Heaven | HeavenGames