• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Something Fun: Random walking GUI Trigger

Status
Not open for further replies.
Level 8
Joined
Feb 20, 2007
Messages
338
For fun and education purposes.

How would you construct a GUI trigger or set of triggers to move about unit types (Villager units) through the streets of a town or village giving your village the feel of folk going about their day to day life.

Note: Random walk ability (used for neutral passive critters) causes them to stop and start - does not "feel" right for a 'busy village'. Kind of feel.

Extra kudos if you can make the villagers say one of their "hellos" when your hero unit walks by them.
 
Level 4
Joined
Jun 19, 2007
Messages
107
maby this im not sure

  • Event - When a unit stops
  • Condition - Unit type of(the unit whichs stops) Equal to Villager (whteva you wanna call it)
  • Action - Make (stopping unit) Issue Order Move to Random point in YOURCITY (a region or just the whole map)
 
Level 4
Joined
Jun 19, 2007
Messages
107
and a bit better:

  • Event - Map Initialization
  • Action - Unit Group - Pick every unit in (Playable map area) and do multiple actions
    • Loop actions:
      • Action - If (( Unit type of (Picked unit) Equal to "Villager") then do (Unit Group - Add (Picked unit) to ("yourunitgroup") else do (Do nothing)
and after this

  • Event - Every "30.00" seconds of game time
  • Action - Unit Group - Pick Every unit in "yourunitgroup" and do Unit - Order (Picked unit) to Move To (Random Point in (Playable map area/your own region)
 
Last edited:
Level 8
Joined
Feb 20, 2007
Messages
338
uh.. give them the wander abillity? and make them movement type fly so you can add pathing blockers air to were you want to restrict them from going but not the hero.

That would be a good idea, however the wander ability doesn't look right. Units start and stop, wander this way, wander that way. (Wander, I called it random walk - sorry)
 
Level 13
Joined
Nov 20, 2006
Messages
553
yea, cr8 region, in many side of your city, then cr8 trigger like TD map creep movement, set by percentage, 50% unit enter region will remove him ( it like the villager gone enter the building) , and chance to cr8 other villager to move again n again every some seconds. So the villager in your city not monoton , many variation villager.

if player pick the villager, give a percen to
to say hello, a word , or something above him.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,208
Well welcome the problems that faced the makers of the game, TES oblivion.
You have to dervise some complex system so each villager is not "randomly" walking aroud but is actually going somewhere that looks random to the player. To do this you have to think where each person would actually be going and why and when it reaches its desternation make it preform some task and then based on a list of choices, make it go somewhere else with a slight random element to make it look real.

There is also the so called random generic sector model for this kind of problem where you do your entire map in sectors and each sector has villagers moving in a certian direction, and if it leaves the "loaded sectiors" which should be 3*3 sectors, it is removed so that it can actually look very random and realistic since more people can be used in it due to the fact that no un needed random trigger actions are being preformed. Most modern games use this kind of system or simlar for genericly created characters and use the system I mentioned above for unique characters.
 
Status
Not open for further replies.
Top