- Joined
- May 4, 2007
- Messages
- 2,260
MM
Hynd, yes you already explained that to me, but the problem here is the fact that i can't use your way in this part. I have GetUnitLoc, and not GetUnitX(Y), thus i can't.
About your alternative, PurplePoot already suggested it but it didn't work ... i will give it a second try.
Also PurplePoot If i use the "call UnitApplyTimedLife(CreateUnit(...),'BTLF',1)
" the effect will die b4 reaching it's full potential if you understand me.
Such method is not strange for me, but i also know it's disavantages, thus my choice not to use it.
And Wyrmworld, well, what can i say, you are correct. I will make the units invulnerable, but if they are under the effect of an aura, well, i won't be able to avoid that since auras are not spells which can be casted...
Further development soon.
Also, the fact that this thread has 6 pages, only shows how interested i am in learning JASS. =P
As the title says, this is the new level of JASS for me.
EDIT: Hey Guys i changed and fixed my script, but now i have a problem ... When the units reach their destination, they turn back, and they walk back ... it's like they are trying to go to the original point from which they came from.
How do i avoid this situation ?
Here are some pieces of my script:
Here iis when i order my general to move.
Now here are when i order the following units:
Can you please tell me why the unit turn back plz ??, i don't want that to happen =S
If you want i can post the whole script...
Hynd, yes you already explained that to me, but the problem here is the fact that i can't use your way in this part. I have GetUnitLoc, and not GetUnitX(Y), thus i can't.
About your alternative, PurplePoot already suggested it but it didn't work ... i will give it a second try.
Also PurplePoot If i use the "call UnitApplyTimedLife(CreateUnit(...),'BTLF',1)
" the effect will die b4 reaching it's full potential if you understand me.
Such method is not strange for me, but i also know it's disavantages, thus my choice not to use it.
And Wyrmworld, well, what can i say, you are correct. I will make the units invulnerable, but if they are under the effect of an aura, well, i won't be able to avoid that since auras are not spells which can be casted...
Further development soon.
Also, the fact that this thread has 6 pages, only shows how interested i am in learning JASS. =P
As the title says, this is the new level of JASS for me.
EDIT: Hey Guys i changed and fixed my script, but now i have a problem ... When the units reach their destination, they turn back, and they walk back ... it's like they are trying to go to the original point from which they came from.
How do i avoid this situation ?
Here are some pieces of my script:
JASS:
set h1 = CreateUnit(P6, 'H015', GetRectCenterX(uh1), GetRectCenterY(uh1), 270.00)
set ef1 = CreateUnit(P6, 'h01B', GetRectCenterX(uh1), GetRectCenterY(uh1), 0.00)
call SetUnitInvulnerable(h1, true)
call UnitApplyTimedLife(ef1, 'BTLF', 1.00)
call SetUnitMoveSpeed( h1, ( GetUnitDefaultMoveSpeed(h1)/2))
call IssuePointOrder(h1, "attack", GetUnitX(h1),GetUnitY(h1)-1000)
call TriggerSleepAction (1.00)
Now here are when i order the following units:
JASS:
set m1 = CreateUnit(P6, 'h00B', GetRectCenterX(u1), GetRectCenterY(u1), 270.00)
set ef2 = CreateUnit(P6, 'h01B', GetRectCenterX(u1), GetRectCenterY(u1), 0.00)
call SetUnitInvulnerable(m1, true)
call UnitApplyTimedLife(ef2, 'BTLF', 1.00)
call SetUnitMoveSpeed( m1, ( GetUnitDefaultMoveSpeed(m1)/2))
set m2 = CreateUnit(P6, 'h00B', GetRectCenterX(u2), GetRectCenterY(u2), 270.00)
set ef3 = CreateUnit(P6, 'h01B', GetRectCenterX(u2), GetRectCenterY(u2), 0.00)
call SetUnitInvulnerable(m2, true)
call UnitApplyTimedLife(ef3, 'BTLF', 1.00)
call SetUnitMoveSpeed( m2, ( GetUnitDefaultMoveSpeed(m2)/2 ))
set m3 = CreateUnit(P6, 'h00B', GetRectCenterX(u3), GetRectCenterY(u3), 270.00)
set ef4 = CreateUnit(P6, 'h01B', GetRectCenterX(u3), GetRectCenterY(u3), 0.00)
call SetUnitInvulnerable(m3, true)
call UnitApplyTimedLife(ef4, 'BTLF', 1.00)
call SetUnitMoveSpeed( m3, ( GetUnitDefaultMoveSpeed(m3) /2 ))
set m4 = CreateUnit(P6, 'h00B', GetRectCenterX(u4), GetRectCenterY(u4), 270.00)
set ef5 = CreateUnit(P6, 'h01B', GetRectCenterX(u4), GetRectCenterY(u4), 0.00)
call SetUnitInvulnerable(m4, true)
call UnitApplyTimedLife(ef5, 'BTLF', 1.00)
call SetUnitMoveSpeed( m4, ( GetUnitDefaultMoveSpeed(m4) /2))
call IssuePointOrder(m1, "attack", GetUnitX(m1),GetUnitY(m1)-900)
call IssuePointOrder(m2, "attack", GetUnitX(m2),GetUnitY(m2)-900)
call IssuePointOrder(m3, "attack", GetUnitX(m3),GetUnitY(m3)-900)
call IssuePointOrder(m4, "attack", GetUnitX(m4),GetUnitY(m4)-900)
call TriggerSleepAction(1.00)
Can you please tell me why the unit turn back plz ??, i don't want that to happen =S
If you want i can post the whole script...
Last edited: