• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Questions related to ForForce()

Status
Not open for further replies.
1. Yes, force in JASS is equivalent to "Player Group" in GUI
2. This is how it looks:
JASS:
function Callback takes nothing returns nothing 
    // You can use GetEnumPlayer() to refer to the player that was picked
endfunction

function Test takes nothing returns nothing 
    call ForForce(bj_FORCE_PLAYER[0], function Callback)
endif

You can use global variables if you need to pass any data. Just assign them before the ForForce, and then use them in the callback. Good luck.
 
Level 11
Joined
Oct 11, 2012
Messages
711
1. Yes, force in JASS is equivalent to "Player Group" in GUI
2. This is how it looks:
JASS:
function Callback takes nothing returns nothing 
    // You can use GetEnumPlayer() to refer to the player that was picked
endfunction

function Test takes nothing returns nothing 
    call ForForce(bj_FORCE_PLAYER[0], function Callback)
endif

You can use global variables if you need to pass any data. Just assign them before the ForForce, and then use them in the callback. Good luck.

Got it, thanks! :)
 
Status
Not open for further replies.
Top