- Joined
- Mar 1, 2013
- Messages
- 555
Greetings everyone
I'm fairly confident with custom scripts and used them for a very long time without problem. However I encountered a strange situation where this function simply does nothing
.
Read full source code or download map in link: Meat Hook
In the loop trigger under ---CURVE--- is the following piece of code:
If you replace Custom script:
Thank you for helping
I'm fairly confident with custom scripts and used them for a very long time without problem. However I encountered a strange situation where this function simply does nothing
Read full source code or download map in link: Meat Hook
In the loop trigger under ---CURVE--- is the following piece of code:
-
For each (Integer Temp_IntB) from 2 to MeatHLength[MeatHCustomValue], do (Actions)
-
Loop - Actions
-
-------- CURVE --------
-
Set MeatHCurPoint = (Position of MeatHChain[Temp_IntB])
-
Set MeatHNextPoint = (Position of MeatHChain[(Temp_IntB - 1)])
-
Set Temp_Real = (Angle from MeatHNextPoint to MeatHCurPoint)
-
Set MeatHNewPoint = (MeatHNextPoint offset by MeatHChainRate[MeatHCustomValue] towards Temp_Real degrees)
-
Custom script: call SetUnitPosition(udg_MeatHChain[udg_Temp_IntB], GetLocationX(udg_MeatHNewPoint), GetLocationY(udg_MeatHNewPoint))
-
Custom script: call SetUnitFacing(udg_MeatHChain[udg_Temp_IntB], udg_Temp_Real)
-
Custom script: call RemoveLocation(udg_MeatHCurPoint)
-
Custom script: call RemoveLocation(udg_MeatHNextPoint)
-
Custom script: call RemoveLocation(udg_MeatHNewPoint)
-
-
If you replace Custom script:
-
call SetUnitPosition(udg_MeatHChain[udg_Temp_IntB], GetLocationX(udg_MeatHNewPoint), GetLocationY(udg_MeatHNewPoint))
-
Custom script: call SetUnitX(udg_MeatHChain[udg_Temp_IntB], GetLocationX(udg_MeatHNewPoint))
Thank you for helping