Home   Help Search Login Register  

Author Topic: Random travel between towns  (Read 1141 times)

0 Members and 1 Guest are viewing this topic.

amadeus88

  • Guest
Random travel between towns
« on: 22 Apr 2005, 03:52:51 »
I spent a couple hours trying to find an answer to this question here in the forums and in the editors depot and couldn't find anything so i hope this wasn't answered already.

I'm trying to set it up so npc's in vehicles (in groups and individualy) randomly drive between towns, i set a game logic marker at eatch of the towns (named Town1, town2, ect.) and over those  
a trigger randomly selecting another of the towns. But my problem being that i don't want to give specific unit names to the units for the triggers to work so i can add and remove units easy. And "_this" didn't seem to work, is that because when _this is used in the "on activation field" it refers to the trigger and not the unit triggering it?

The code i tryed was "this move getpos town2" (havn't added the randomization yet for ease of debugging) and it works as long i i replace this with the name of the npc (like "civ 1").

Anybody know what i am doing wrong?

Thanks in advance!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Random travel between towns
« Reply #1 on: 22 Apr 2005, 06:47:07 »
thislist in the activation field of a trigger will give an array of all the units that are currently activating the trigger.

so

thislist select 0 etc. will enable you to get at the units

Does this help?
« Last Edit: 22 Apr 2005, 06:48:48 by THobson »