I want it every time the unit moves, there to be a change that it will get into a random encounter. Right now its triggered on unit move, that first line.
I think doing this would help figure out where it's going wrong:
Directly under "Set Battle unit"
Create 2 debugging messages,
Text message ( convert integer to text ( battle zone unit 1 count ) )
Text message ( convert integer to text ( battle zone unit 2 count ) )
1. This will tell you if the trigger is actually being run
2. It will tell you if your conditions will be met
Also, maybe try something other than "any unit" as the event, or the "move order", like for debugging switch it to a 5 second game timer and see if it runs, if it runs with a simple timer, then it's something in your event.
this seems to be the problem. if i remove it, it works fiine up until i kill the zerglings. it supposed to shoot me back to where i originally was this also dose not work because of an integer problem .
(Abs(Battle Zone 1 Unit Count)) == 1
the battle zone unit count is what im having a problem with, if i remove it the trigger works. if i keep it there it dosent i think this may be a bug in the editor.
I got the random encounter to work with the move condition but that is now what i am looking for because if a player clicks once to move somewhere, its only going to check for an encounter once.
it hates random numbers or checking a integer i not sure witch. I cannot get it to properly keep count of how many units are in each group and some way of making the encounters random. I need the triggering effect(action) to be something that triggers randomly when the unit moves.
However it is an event and I don't believe events re-fetch the units position so you may have to make it a variable and have that variable fetched on so conditions...
I hate timers but you could make one check every X periodic seconds and condition while unit is not in battle, have it check the units position and if its not the same as last position the trigger was ran... etc...
Ok i reworked the vectors and locations. but it still is not right. no random battles happen. But i am close.
i need fresh eyes on this my brain hurts lol
I am getting the players current location Evey .2 game seconds and trying to initiate battle when it comes within a random range of his current position ( i think) im just almost confused at this point lol
Okay this is most likely because some reason events ( I believe ) will not re-fetch a units position and use its static initial position.
This is my suggestion and I believe this will work, to activate random encounters or when battle is over have another trigger, ' Start Trigger ( Random Encouter ) ' to restart the trigger as there's no event.
RandomEncountersEventsLocalVariablesRandom=0<Integer>UnitOldLocationPoint=NoPoint<Point>ConditionsActionsGeneral-While(Conditions)aretrue,do(Actions)ConditionsUnitinbattle==falseActionsVariable-SetUnitOldLocationPoint=(PositionofMarine[125.90,124.98])General-Wait2.0GameTimesecondsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Distancebetween(PositionofMarine[125.90,124.98])andUnitOldLocationPoint)>=1.0ThenVariable-SetRandom=(Randomintegerbetween1and100)General-If(Conditions)thendo(Actions)elsedo(Actions)IfRandom<=10Then------- COMMENT: INITIATE MOVE TO BATTLETrigger-Stopallinstancesof(Currenttrigger)ElseElse
IT WORKS! thank you so much! one last problem though i updated it on the top post the hero is not properly returning to his original location after the creeps die. he kills them all the debug counts down the kills, but its just not calling the "Then" to transport the unit back its calling the "Else" my "If" condition logic may be off.
What i am trying to do is make random encounters when a unit moves around like final fantasy.
=======================================
Map Update
It's working floks!
A HUGE thank you to Zachet!
Not that i have the foundation of my RPG i am going to build on it!
you can DL the System here:
http://www.sc2mapster.com/maps/random-battle-system/files/1-random-battle-system-va-0-01/
you want the trigger to run when Battle Zone 1 Unit Count == 0? If yes then check condition in Run Battle Zone 1 and Run Battle Zone 2
yeah i fixed the post lol submitted it and realized it had no formatting.
let me attach the file,
I want it every time the unit moves, there to be a change that it will get into a random encounter. Right now its triggered on unit move, that first line.
Try a debugging message to figure it out.
I think doing this would help figure out where it's going wrong:
Directly under "Set Battle unit"
Create 2 debugging messages,
Text message ( convert integer to text ( battle zone unit 1 count ) )
Text message ( convert integer to text ( battle zone unit 2 count ) )
1. This will tell you if the trigger is actually being run
2. It will tell you if your conditions will be met
Also, maybe try something other than "any unit" as the event, or the "move order", like for debugging switch it to a 5 second game timer and see if it runs, if it runs with a simple timer, then it's something in your event.
@Squeegeez: Go
here is the update:
@Pandaros_Brewmaster: Go
I got the random encounter to work with the move condition but that is now what i am looking for because if a player clicks once to move somewhere, its only going to check for an encounter once.
it hates random numbers or checking a integer i not sure witch. I cannot get it to properly keep count of how many units are in each group and some way of making the encounters random. I need the triggering effect(action) to be something that triggers randomly when the unit moves.
anyone have any ideas?
Something like this would almost work
However it is an event and I don't believe events re-fetch the units position so you may have to make it a variable and have that variable fetched on so conditions...
I hate timers but you could make one check every X periodic seconds and condition while unit is not in battle, have it check the units position and if its not the same as last position the trigger was ran... etc...
@zachet: Go
Ok i reworked the vectors and locations. but it still is not right. no random battles happen. But i am close.
i need fresh eyes on this my brain hurts lol
I am getting the players current location Evey .2 game seconds and trying to initiate battle when it comes within a random range of his current position ( i think) im just almost confused at this point lol
@Pandaros_Brewmaster: Go
Updated top post
Okay this is most likely because some reason events ( I believe ) will not re-fetch a units position and use its static initial position.
This is my suggestion and I believe this will work, to activate random encounters or when battle is over have another trigger, ' Start Trigger ( Random Encouter ) ' to restart the trigger as there's no event.
@zachet: Go
IT WORKS! thank you so much! one last problem though i updated it on the top post the hero is not properly returning to his original location after the creeps die. he kills them all the debug counts down the kills, but its just not calling the "Then" to transport the unit back its calling the "Else" my "If" condition logic may be off.
I can take another quick look, I was going to mention this before but I believed you fixed it.
The issue is the conditions, take a close look at them.
You originally had, IF:
OWNER OF TRIGGERING UNIT NOT PLAYER 15.
OWNER OF TRIGGERING UNIT NOT PLAYER 0.
The triggering unit is the unit that died.
The unit that died is a zergling owned by player 15.
Remove all those conditions or modify them.
[reply=71887]
is the != the not equal to?
I Currently have:
@Pandaros_Brewmaster: Go
OOO i need to change triggering unit to killing unit....DUH lol i have been looking at this for too long!
Yes, != means not equal to.
I suggest moving the (Owner of (Triggering unit)) == 15 above the ' NOT ' and deleting the NOT condition.
Also you can remove the Absolute part of (Abs(Battle Zone 1 Unit Count)) == 1
@zachet: Go
Cool i posted the system here
http://www.sc2mapster.com/maps/random-battle-system/files/1-random-battle-system-va-0-01/
with instructions for use in case anyone else wanted to use it!