T
Toto.
Guest
-IDK if title was said correctly..-
But anyway, Ive recently posted another thread on fixing my errors (Im pretty newbish at JASS atm), which I have gotten help in and fixed. But now, Im onto making the functions for my Grenade Spell work in-game, but they seem to not. :| I dont know if posting this here will get me help, because Id need someone familiar with the Particle System.. but then again, this might be very popular.
Anyway, heres my trigger:
I have doubled checked on all of the ID's and they're all correct, but nothing happens at all in-game. I cast the Grenade spell and all my unit does is face the casting point. If anyone is familiar with the Particle System, or if they can just figure out my problem, then please help..
-NOTE: I have followed the directions and gotten the information for my Grenade Spell from this Tutorial -Here-
But anyway, Ive recently posted another thread on fixing my errors (Im pretty newbish at JASS atm), which I have gotten help in and fixed. But now, Im onto making the functions for my Grenade Spell work in-game, but they seem to not. :| I dont know if posting this here will get me help, because Id need someone familiar with the Particle System.. but then again, this might be very popular.
Anyway, heres my trigger:
JASS:
function Trig_ThrowGrenade_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A005039;
endfunction
function Trig_ThrowGrenade_Actions takes nothing returns nothing
endfunction
function Trig_ThrowGrenade1_Actions takes nothing returns nothing
local location casterpos = GetUnitLoc(GetSpellAbilityUnit())
local location topos = GetSpellTargetLoc()
local unit u
endfunction
function Trig_ThrowGrenade2_Actions takes nothing returns nothing
local location casterpos = GetUnitLoc(GetSpellAbilityUnit())
local location topos = GetSpellTargetLoc()
local unit u = CreateParticle(GetOwningPlayer(GetSpellAbilityUnit()),039;h001039;,GetLocationX(casterpos),GetLocationY(casterpos),GetUnitFacing(GetSpellAbilityUnit()))
endfunction
function Trig_ThrowGrenade3_Actions takes nothing returns nothing
local location casterpos = GetUnitLoc(GetSpellAbilityUnit())
local location topos = GetSpellTargetLoc()
local unit u = CreateParticle(GetOwningPlayer(GetSpellAbilityUnit()),039;h001039;,GetLocationX(casterpos),GetLocationY(casterpos),GetUnitFacing(GetSpellAbilityUnit()))
call ParticleSetSpeed(u,GetLocationX(topos)-GetLocationX(casterpos),GetLocationY(topos)-GetLocationY(casterpos),1200)
endfunction
function Trig_ThrowGrenade3_Actions takes nothing returns nothing
local location casterpos = GetUnitLoc(GetSpellAbilityUnit())
local location topos = GetSpellTargetLoc()
local unit u = CreateParticle(GetOwningPlayer(GetSpellAbilityUnit()),039;h001039;,GetLocationX(casterpos),GetLocationY(casterpos),GetUnitFacing(GetSpellAbilityUnit()))
call ParticleSetSpeed(u,GetLocationX(topos)-GetLocationX(casterpos),GetLocationY(topos)-GetLocationY(casterpos),1200)
endfunction
function Trig_ThrowGrenade4_Actions takes nothing returns nothing
local location casterpos = GetUnitLoc(GetSpellAbilityUnit())
local location topos = GetSpellTargetLoc()
local unit u = CreateParticle(GetOwningPlayer(GetSpellAbilityUnit()),039;h001039;,GetLocationX(casterpos),GetLocationY(casterpos),GetUnitFacing(GetSpellAbilityUnit()))
call ParticleSetSpeed(u,GetLocationX(topos)-GetLocationX(casterpos),GetLocationY(topos)-GetLocationY(casterpos),1200)
call ParticleLinkConditionTrigger2Func(u, ParticleGroundHit(), "GroundHit_Bounce")
call ParticleLinkConditionTrigger2Func(u, ParticleDeath(), "Death_Remove")
call ParticleAddForce(u, G())
endfunction
function Death_RemoveBoom takes nothing returns nothing
local location upos = GetUnitLoc(GetEnumUnit())
local effect eff = AddSpecialEffectLocBJ(upos, "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl")
call DestroyEffect(eff)
call RemoveParticle(GetEnumUnit(),true)
call RemoveLocation(upos)
set upos=null
endfunction
//===========================================================================
function InitTrig_ThrowGrenade takes nothing returns nothing
set gg_trg_ThrowGrenade = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ThrowGrenade, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ThrowGrenade, Condition( function Trig_ThrowGrenade_Conditions ) )
call TriggerAddAction( gg_trg_ThrowGrenade, function Trig_ThrowGrenade_Actions )
endfunction
I have doubled checked on all of the ID's and they're all correct, but nothing happens at all in-game. I cast the Grenade spell and all my unit does is face the casting point. If anyone is familiar with the Particle System, or if they can just figure out my problem, then please help..
-NOTE: I have followed the directions and gotten the information for my Grenade Spell from this Tutorial -Here-