Okay, that makes more sense, however, I can't find the value for the (owner of damaging unit). I was able to work out the events, but I can't get the other half of it to work. Is it a custom value that I need to enter or what? Sorry if this is annoying, like I said, I don't know how to do triggers....
Category: Unit -> Owner of Unit -> Damaging Unit
Category: Unit -> Set Unit Property (life current) -> Math arithmetic
Well anyway. The function itself works. The arrays are also working.
There's no bug or anything here. Run the function manually, make sure everything is set etc.
Hard really to help you based on your claims.
Often people say "i do that" when they actually miss their errors and do something slightly different.
The mentioned spawn,send unit method should test if path is indeed blocked without errors. Also it will show you where the unit actually goes in case it's blocked.
Other than that you may send me map in PM, point on where and when error happens and i will most likely find the error.
If your using pre placed units on map and you want let's say 'Rocks unit' to not be damageable by player 5 then your trigger will look look like this
Event:'Rocksunit'takesdamageActions:if(ownerofdamagingunit)==5settriggeringunitcurrentlife=triggeringunitcurrentlife+damagetakenamount;// this will simply heal the unit back if attacking player is the player that it should be immune to
If the player do not change then you can add another event to the same trigger with different unit.
Interesting, thanks for the advice. Is there a practical difference between a While loop and a Repeat Forever loop (besides being able to use conditions for the while loop?) I've used both but have never really noticed any changes between the two.
Also, about how many times can a loop repeat in a single game tick before causing bad lag/crashes?
Well there's no such thing as repeat forever itself. In code, as you can see, it's: while (true),
Limit is around 690k operations per game tick i believe. Wait 0.0 pushes execution to next tick.
Still you need to count the fact that user may be running a lot of actions prior to your function call. This vary a lot. Personally i had issues with 6k+ loops
So count mod 1000 or 500 it's safe limit. Probably won't even reach it in single call yet it's worth to have it because error breaks everything.
0
One year later....
PlxThx
0
Do you actually use "Save Bank" or by save you mean "Store something"?
0
Category: Unit -> Owner of Unit -> Damaging Unit
Category: Unit -> Set Unit Property (life current) -> Math arithmetic
0
try create without ignoring placement
0
Well anyway. The function itself works. The arrays are also working. There's no bug or anything here. Run the function manually, make sure everything is set etc.
If you don't believe run this
0
Does the function run till the point of create unit?
0
You didn't run the action. Simple.
Or your odd points returns 0,0 or -1,-1 and you spawn them outside of the map
0
It appears the pathing cost function have issues with small spaces. (<1) This Behaviors is tied to route finding.
If function returns 65536 then unit sent from/to this point will be stuck trying to take shortcut thru wall even when the 'normal' route is open.
Anyway I consider this to be core bug.
Small theory on why it blocks the maze even with openings >1 wide. (potentially caused by rectangle blocks structure)
0
Hard really to help you based on your claims.
Often people say "i do that" when they actually miss their errors and do something slightly different.
The mentioned spawn,send unit method should test if path is indeed blocked without errors. Also it will show you where the unit actually goes in case it's blocked.
Other than that you may send me map in PM, point on where and when error happens and i will most likely find the error.
0
If your using pre placed units on map and you want let's say 'Rocks unit' to not be damageable by player 5 then your trigger will look look like this
If the player do not change then you can add another event to the same trigger with different unit.
0
True. Tho i would prefer text tags. More control from trigger level. Text Tags are integers. You could save it in unit's custom value for example.
But if it works for you than don't bother :)
0
o rly?
0
You create text actors? Maybe Text Tags would be more suitable for this. They can fly, be attached etc
0
the libNtve_gf_SendActorMessageToGameRegion() works without issues. Make sure your region is correct.
EDIT:
This changes what you tried to do before. Static point actor vs attached to unit.
0
Well there's no such thing as repeat forever itself. In code, as you can see, it's: while (true),
Limit is around 690k operations per game tick i believe. Wait 0.0 pushes execution to next tick.
Still you need to count the fact that user may be running a lot of actions prior to your function call. This vary a lot. Personally i had issues with 6k+ loops
So count mod 1000 or 500 it's safe limit. Probably won't even reach it in single call yet it's worth to have it because error breaks everything.