Shadow
TH.net Regular
- Reaction score
- 23
Question 1
Alright first off, hello!
So i've been jassing on and off for a few months now. I had a teacher but he stopped playing so now i'm on my own for now.
So first off I wanna make a trigger where at the start all allies of red ally neutral victim.
So I start in Gui and construct my my trigger.
Then I convert to custom text
Normally I would inline ( I believe this means finding the root function in some of the functions written in red)
but when I attempt to inline SetPlayerAllianceStateBJ a whole bunch comes up so i think maybe if I created a function that cycled (looped) through the players and allied neutral victim would be the best way to go, no? But unfortunately my players on the teams aren't in integer order, example Player Red (0) and Player Blue (1) are on separate teams so now I believe the way to go is to make a filter but I am clueless how to set one up.
----------------
Question 2
How can I determine the attack damage of a unit because I want it so when a hero gets a powerup he does 2x damage
Alright first off, hello!
So i've been jassing on and off for a few months now. I had a teacher but he stopped playing so now i'm on my own for now.
So first off I wanna make a trigger where at the start all allies of red ally neutral victim.
So I start in Gui and construct my my trigger.
Trigger:
- Select Players
- Events
- Map initialization
- Conditions
- Actions
- Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Player - Make (Picked player) treat Neutral Victim as an Ally with shared vision)
- Events
Then I convert to custom text
JASS:
function Trig_Select_Players_Func002002 takes nothing returns nothing
call SetPlayerAllianceStateBJ( GetEnumPlayer(), Player(bj_PLAYER_NEUTRAL_VICTIM), bj_ALLIANCE_ALLIED_VISION )
endfunction
function Trig_Select_Players_Actions takes nothing returns nothing
call ForForce( GetPlayersAllies(Player(0)), function Trig_Select_Players_Func002002 )
endfunction
//===========================================================================
function InitTrig_Select_Players takes nothing returns nothing
[/FONT] set gg_trg_Select_Players = CreateTrigger( )
call TriggerAddAction( gg_trg_Select_Players, function Trig_Select_Players_Actions )
endfunction
Normally I would inline ( I believe this means finding the root function in some of the functions written in red)
but when I attempt to inline SetPlayerAllianceStateBJ a whole bunch comes up so i think maybe if I created a function that cycled (looped) through the players and allied neutral victim would be the best way to go, no? But unfortunately my players on the teams aren't in integer order, example Player Red (0) and Player Blue (1) are on separate teams so now I believe the way to go is to make a filter but I am clueless how to set one up.
----------------
Question 2
How can I determine the attack damage of a unit because I want it so when a hero gets a powerup he does 2x damage