Parameters
team = 0 <Integer>
enemy = 0 <Integer>
Grammar Text: Team to enemy(team, enemy)
Hint Text: (None)
Custom Script Code
Local Variables
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
team == 0
Then
Variable - Set enemy = 1
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
team == 1
Then
Variable - Set enemy = 0
Else
UI - Display (Text(enemy)) for (All players) to Subtitle area
General - Return enemy
But i dont know how to change the enemy parameter as the variable in the trigger it has used it.
If not can at least someone tell me how to do this with functions?
You can change the value of a parameter just like the value of a variable. Just go Set Variable and select a parameter instead of a variable.
Or do I misunderstand your problem here?
Multiply
Options: Function
Return Type: Integer
Parameters
x = 0 <Integer>
a = 0 <Integer>
Grammar Text: Multiply(x, a)
Hint Text: (None)
Custom Script Code
Local Variables
r = 0 <Integer>
Actions
Variable - Set r = (x * a)
General - Return r
and how to use it in your trigger
Events
Game - Map initialization
Local Variables
y = 5 <Integer>
Conditions
Actions
Variable - Set y = (Multiply(y, 4))
I want to use an action like this:
But i dont know how to change the enemy parameter as the variable in the trigger it has used it.
If not can at least someone tell me how to do this with functions?
You can change the value of a parameter just like the value of a variable. Just go Set Variable and select a parameter instead of a variable.
Or do I misunderstand your problem here?
@s3rius:
if i do it your way the variable is chanegd locally, but it shoudl changed the parameter which is inputted and not the local copy of it.
Meaning i want to change a local variable from the trigger which used the action without using global variables
Custom Function
Multiply
Options: Function
Return Type: Integer
Parameters
x = 0 <Integer>
a = 0 <Integer>
Grammar Text: Multiply(x, a)
Hint Text: (None)
Custom Script Code
Local Variables
r = 0 <Integer>
Actions
Variable - Set r = (x * a)
General - Return r
and how to use it in your trigger
Events
Game - Map initialization
Local Variables
y = 5 <Integer>
Conditions
Actions
Variable - Set y = (Multiply(y, 4))
@Rugvip:
when using custom script this works: Variable - Set y = gf_multiply(lv_y,4)