So will the path be always the same for every time you play this game? ( on the picture start 2 will always take the green path? )
Galaxy pwns GUI. ( was the same for wc3 ).
Btw. if there around 30 "maps" with 2 paths each. And every path has around 12 nodes you get 30 * 2 * 12 = 720 values you have to write in there, with GUI. HF clicking.
Maybe you write them all down, but you don't have to save em all. Just divide the set uservalue into functions, one for each map. And the call them when a player chooses a map.
a "H" is indeed a nice problem, but isn't it a problem with your way to?
Nope since I would randomize the path in one single time. So I could always check: Next unit != current unit. With rects you would have to save that somehow.
Just an example how I would do it (wip).
////Custom Value index 0 says how many possible paths there are. -1 means is an end unit.////Missing: Back Walk , More Reach TriggersconstintMAX_PLAYERS=12;constfixedREACH_RANGE=0.5;structPathSystem{unitgroupstarters;intplayer;triggerreached;};PathSystem[MAX_PLAYERS]Paths;voidPSUnitReachedTargetOfPlayer1(){//Create for all players ( makros would be cool :D )}voidInitPathSystem(){inti=1;Paths[i].starters=UnitGroupEmpty();Paths[i].player=i;Paths[i].reached=TriggerCreate("PSUnitReachedTargetOfPlayer"+IntToString(i));}voidPSCreateStarter(intplayer,intid){UnitGroupAdd(Paths[player].starters,UnitFromId(id));UnitSetCustomValue(UnitFromId(id),0,0.00);}voidPSCreateEnd(intplayer,intid){TriggerAddEventUnitRange(Paths[player].reached,null,UnitFromId(id),REACH_RANGE,true);UnitSetCustomValue(UnitFromId(id),-1,0.00);}voidPSAddNewDirection(intplayer,intcasterID,inttargetID){unitu=UnitFromId(casterID);UnitSetCustomValue(u,0,UnitGetCustomValue(u,0)+1);UnitSetCustomValue(u,UnitGetCustomValue(u,0),IntToFixed(targetID));}boolPSApplyOnUnit(intplayer,unitcreep){intcount=UnitGroupCount(Paths[player].starters,c_unitCountAll);fixedr;inti;intrandom;intnext;unitu;if(count<=0){returnfalse;//No starting point}u=UnitGroupRandomUnit(Paths[player].starters,c_unitCountAll);UnitSetPosition(creep,UnitGetPosition(u),false);while(1==0){r=UnitGetCustomValue(u,0);i=FixedToInt(r);if(i=0){returnfalse;//Path not finished.}random=RandomInt(1,i);next=UnitGetCustomValue(u,random);u=UnitFromId(next);UnitIssueOrder(creep,"move",c_orderQueueAddToEnd);if(i=-1){//exitreturntrue;}}}
The performance with my way (uservalues) is way better than your way. You have to create 56 units, I have to create 1. You have to create 56 different triggers or one trigger with 56 ifs. For my way you have to initialise only these paths you will need in this games. So only the amount of players you have. Then you have an additional problem. What happens if ther is something like a "H" so there is a way that they can come from the the base of the H and walk up to the first cross way. There they go left or right and when they reach the other side they can walk back and forth again ...
Your way would need like 20 times more time to load then mine. Since you want to create also rects and have to laod 56 times the units I have. And the most of my code would be loaded when the player chooses a map...
And I wouldn't say your method is faster to do. I mean 56 units are a lot. And you have to search always the right one. And creating them uses also time.
Btw. I've begun with writing my idea in galaxy. (need it also for my self).
Path Unit UserValue Index 0 = 2 ( there are two possible ways )
Index 1 = Way one.
Index 2 = Way two.
You chose the way throught a random int.
Btw. does stun interupt the order queue? If not you could set the path on creep creation through queueing the movement orders.
You could also use unit comes in range event and different unit types. But you would need many unit types. ( left, left or right, left or right or up ... )
Is it possible to use units instead of points? Since you could use the uservalue of the units for the path. Example:
Unit 1 (start) uservalue index 0 = 1. That means there is one possbile path. Index 1 = id of the next unit.
Unit 2 (node) uservalue index 0 = 2. That means there are two possible paths. Index 1 = first unit, Index 2 = second unit.
End the end unit has a index 0 = -1 or something like that.
I thought about saving the new path with a string, since you can change a point to two fixed and these to strings. Now I would add these strings together with a " " between the values. And the use StringWord( the string, n - (n-1) ).
Wouldn't it be possible to set the Beheavier whitch creates the aura stackable and the same for the effect beheavier? Than you could simply add the aura Beheavier a second time to the leader. The Effect beheavier should than be applied two times right?
But even this works, you need still for each effect of the aura one aura...
0
So will the path be always the same for every time you play this game? ( on the picture start 2 will always take the green path? )
Galaxy pwns GUI. ( was the same for wc3 ).
Btw. if there around 30 "maps" with 2 paths each. And every path has around 12 nodes you get 30 * 2 * 12 = 720 values you have to write in there, with GUI. HF clicking.
0
Working on it.
edit: Done
0
Maybe you write them all down, but you don't have to save em all. Just divide the set uservalue into functions, one for each map. And the call them when a player chooses a map.
a "H" is indeed a nice problem, but isn't it a problem with your way to? Nope since I would randomize the path in one single time. So I could always check: Next unit != current unit. With rects you would have to save that somehow.
Just an example how I would do it (wip).
0
The performance with my way (uservalues) is way better than your way. You have to create 56 units, I have to create 1. You have to create 56 different triggers or one trigger with 56 ifs. For my way you have to initialise only these paths you will need in this games. So only the amount of players you have. Then you have an additional problem. What happens if ther is something like a "H" so there is a way that they can come from the the base of the H and walk up to the first cross way. There they go left or right and when they reach the other side they can walk back and forth again ...
Your way would need like 20 times more time to load then mine. Since you want to create also rects and have to laod 56 times the units I have. And the most of my code would be loaded when the player chooses a map...
And I wouldn't say your method is faster to do. I mean 56 units are a lot. And you have to search always the right one. And creating them uses also time.
Btw. I've begun with writing my idea in galaxy. (need it also for my self).
0
why only 2 random? You would need a random unit for every possible combination. Because ther might be a path that goes N and NE and NW.
0
Why sould the path for the creep be defined?
Path Unit UserValue Index 0 = 2 ( there are two possible ways ) Index 1 = Way one. Index 2 = Way two. You chose the way throught a random int.
Btw. does stun interupt the order queue? If not you could set the path on creep creation through queueing the movement orders.
You could also use unit comes in range event and different unit types. But you would need many unit types. ( left, left or right, left or right or up ... )
0
Is it possible to use units instead of points? Since you could use the uservalue of the units for the path. Example: Unit 1 (start) uservalue index 0 = 1. That means there is one possbile path. Index 1 = id of the next unit. Unit 2 (node) uservalue index 0 = 2. That means there are two possible paths. Index 1 = first unit, Index 2 = second unit.
End the end unit has a index 0 = -1 or something like that.
0
Should everyone just make one terrain or is it allowed to make two?
0
I thought about saving the new path with a string, since you can change a point to two fixed and these to strings. Now I would add these strings together with a " " between the values. And the use StringWord( the string, n - (n-1) ).
0
I'm on it.
Edit: done
0
I use this to remove the UI Frames. Later I add the Commandfield and Minimap frame again:
But which frame is the one I marked? It stays also when I remove them all.
0
Wouldn't it be possible to set the Beheavier whitch creates the aura stackable and the same for the effect beheavier? Than you could simply add the aura Beheavier a second time to the leader. The Effect beheavier should than be applied two times right?
But even this works, you need still for each effect of the aura one aura...
If I've got some sparetime I will test it...
cedi
0
What about one of these Protoss-Zerg thingies...
It has these abilities:
1. Illusion: Creates two illusion of itself and changes the its position. Illusions vanish after one round.
2. Force Field: Trapps one of the heros in a force field. Stuns him for 2 rounds.
3. Mind Beam: Attack beam which hits all three heros.
- When it has lost 30% of its hp the thingy charges one round for a devasting attack which sets the hp of all heros to 1%.
- When it has lost 60% of its hp it creates a link to one of the heros. The linked hero takes 25% of the damage the thingy takes.
- When it has lost 75% it creates a second link.
- When it has lost 90% it creates a third link.
- When it has lost 99% it breakes all links and steals 50% of the hp of each hero.
Btw. I really like this map...