• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Random Encounter trigger/template

Status
Not open for further replies.
Level 4
Joined
Feb 28, 2008
Messages
84
looking for a trigger that is like Final Fantasy Forever, were you walk around and your party is sent into a random encounter,

I've found one on this site but it is a timer counting down and is not what i am looking for, witch is this one below:

http://www.hiveworkshop.com/forums/triggers-scripts-269/random-encounter-system-158889/


i found this on another website but don't under stand it, anyway someone could trigger it for me? or see if it would work for different regions.

event-
time - periodic event (every 1 seconds)
conditions-
integer comparison - Math - random Intiger between 1 and 100 is less than 5 equal to true
actions-
run the random encounter...

this will mean that every second there is a 5% chance that they will have a random battle (ie. on average one battle every 20 seconds). Then just dissable/reinable this trigger whenever you need to.

But I would suggest you make one which only works if you are moving - that one in fff is a pain in the ass how it works when you're just sitting there doing nothing... Try the same thing but add in another condition that-
(heroPos is just a point variable, make it an array if there is more than one player)

events-
same as above
conditions-
same as above
actions-
if (HeroX is not equal to (unit - position of (the players unit)) then
do the encounter stuff
else
the player is in the same position as they were a second ago, so don't run the trigger

This way, encounters will only occur if your hero has moved at all over the last 1 second - working like it does in most other random encounter games. Make the trigger occur less often to reduce lag (although this shouldn't lag it much at all, unless there is lots going on when it might be better). If you make it run once every 10 seconds, with a 50% chance then it won't make much lag at all and will help to reduce the chance of players getting back from a battle and going straight back into another one - and still retain the average of 1 battle every 20 seconds.

I would suggest values like once every 3 seconds with 15% chance - that should produce a nice result.
 
Level 6
Joined
Apr 29, 2007
Messages
140
I'll help with this trigger if kaizar has problems.

A few questions though:

How many players will there be in your map?
Will they travel in a group like in FF, or will they be able to travel separately?
Will there be a "battle area" for each region; (I.E a separate area for the Island, one for the Forest, etc) or will there just be one terrained "battle area" for all regions.
How random do you want the enemies? For example, If you are on the island and you encounter enemies, will it be the same enemies every time (such as 2
murlocs and a turtle) or do you want it to be able to be varied on the types of units spawned?
 
Level 4
Joined
Feb 28, 2008
Messages
84
think party of 4 would do, so 4 play,

yes, a group like FF

i have made up separate areas of terrain for battle areas

cause i made the world made huge I i don't think having the random battles show up fast on the world map area,

there will be different monsters for each area, and a varied of spawned units will be nice,
 
Level 7
Joined
Jul 20, 2009
Messages
295
I've alrdy done the "Random Encountering" where you walk, you move instatly into a Battle in a Diff map, I thought I'd try to do it, until you give me a map or something. The problem now is the Battle... >.< I'm trying my best to make the Battle perfect. Though I still do not understand, how would the teammates walk together and not separatle? The camera will be locked on which unit? What if someone hated his teammates and wanted to go somewhere else or maybe solo? Each player has 1 hero?
 
Level 4
Joined
Feb 28, 2008
Messages
84
if only the map that had all theses triggers was not protected...

it had it as when you go to would map all players disappear till you encounter a random battle,

you would move around freely in dungeons and city area's, but on world map would stay on party leader,
 
Level 7
Joined
Jul 20, 2009
Messages
295
Oh, so if there were 3 players Red, Blue and Teal, only Red's Hero will be available in world map, until he encounters a random battle, then Blue's and Teal's Hero would show up?

If that's how you want your map to be... it will be boring for Blue and Teal since they have to watch Red play all the time and so, this would not be a multiplayer encountering. :S
 
Status
Not open for further replies.
Top