| 05-30-2005, 02:42 PM | #1 |
This is a really strange bug that happens like 1 times out of 100. The thing that happens is that they somehome seems to get +1 to much in custom value or something. Here Are the triggers: Code:
Move Enemies
Events
Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Entering unit)) Equal to Player 9 (Gray)
(Owner of (Entering unit)) Equal to Player 10 (Light Blue)
(Owner of (Entering unit)) Equal to Player 11 (Dark Green)
(Owner of (Entering unit)) Equal to Player 12 (Brown)
Actions
Unit - Set the custom value of (Entering unit) to ((Custom value of (Entering unit)) + 1)
Set tempInt = (Custom value of (Entering unit))
Custom script: call Move( GetEnteringUnit(), udg_tempInt )Code:
function Move takes unit U, integer I returns nothing
local location RectPoint
set RectPoint = GetRectCenter(udg_MoveRECTS[( ( S2I(SubStringBJ(I2S( I ), 1, 1)) * 17 ) + S2I(SubStringBJ(I2S( I ), 7, 9)) )])
call IssuePointOrderLocBJ( U, "move", RectPoint )
call RemoveLocation( RectPoint )
endfunction |
| 06-22-2005, 08:13 PM | #2 |
I can't really answer that question because I need more information. For example, when does the trigger fire? (it doesn't seem to have any events) Also what exactly went wrong? |
| 06-28-2005, 09:53 AM | #3 |
Oh an answer :p i didnt really follow this thread couse i thought none would answer when some time had gone, but anyway: event is Unit - unit enters region (added the events via "Trigger - Add Event" combined with loop for integerA) the thing that bugs is that, sometimes they seem to get an extra +1 to their custom value couse they skip 1 rect and moves to the rect after instead. |
| 06-28-2005, 10:32 AM | #4 |
just a thought: arent there any rects they "might" run into b4 reaching the next one, meaning their custom value would increase while they werent in the target rect yet? |
| 06-28-2005, 10:38 AM | #5 |
hm, well, i dont think so couse the units doesnt got any collision + they got the shade (visible) ability. btw here's a pic of the pathing. |
| 07-01-2005, 12:37 AM | #6 |
Out of curiosity: what does the shade ability do? |
| 07-01-2005, 04:01 PM | #7 |
Maybe the unit somehow manages to re-enter the region after it is issued a new order, resulting in the unit being ordered one region too far ahead. Try using game cache to store a boolean to true for a unit whenever it enters a region, and set it back to false after a second or so. As long as that boolean is true, do not increase the unit's custom value should it enter a region. |
