http://www.blueberrywizard.webs.com/

Secret Society of Blue

Topic: Triggers Thread

Post-reply-btn
Forum Home > Off Topic > Triggers Thread
BlueBerryWizard
BlueBerryWizard
Site Owner
Posts: 34

Post triggers here...

 

Reload AK 47
    Events
        Unit - A unit Uses an item
    Conditions
        (Level of AK-47  for (Hero manipulating item)) Not equal to 0
        (Charges remaining in (Item being manipulated)) Greater than 0
    Actions
        Sound - Play AK_47_Reload <gen> at 100.00% volume, attached to (Hero manipulating item)
        Item - Set charges remaining in (Item being manipulated) to ((Charges remaining in (Item being manipulated)) + 1)
        Wait 2.00 game-time seconds
        Set TempInteger[2] = ((Integer((Mana of (Hero manipulating item)))) - 30)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (TempInteger[2] x 1) Greater than or equal to 30
            Then - Actions
                Unit - Set mana of (Hero manipulating item) to ((Mana of (Hero manipulating item)) - (Real(TempInteger[2])))
            Else - Actions
                Unit - Set mana of (Hero manipulating item) to ((Mana of (Hero manipulating item)) + (Real((Charges remaining in (Item being manipulated)))))
        Item - Set charges remaining in (Item being manipulated) to ((Charges remaining in (Item carried by (Hero manipulating item) of type 7.62mm)) + TempInteger[2])

What's wrong with the above trigger? WHY DOES IT CAUSE DESYNC?

04:46 PM on 02/15/2009 Flag Quote & Reply
BlueBerryWizard
BlueBerryWizard
Site Owner
Posts: 34

Note: Nothing is wrong with trigger in posting above this one, it turns out it was caused by using camerasource as a location for spawning an item :/.

 

 set udg_sound15=CreateSound("war3mapImported\\AK-47 (Full Auto).mp3",false,true,true,10,10,"CombatSoundsEAX")
 call SetSoundDuration(udg_sound15,810)
 call SetSoundChannel(udg_sound15,5)
 call SetSoundVolume(udg_sound15,'x')
 call SetSoundPitch(udg_sound15,.9)
 call SetSoundDistances(udg_sound15,900.,10000.)
 call SetSoundDistanceCutoff(udg_sound15,3000.)
 call SetSoundConeAngles(udg_sound15,.0,.0,127)
 call SetSoundConeOrientation(udg_sound15,.0,.0,.0)

 

Above = sets the sound for each mp3 sound.

04:38 PM on 02/27/2009 Flag Quote & Reply

You must login to post.

Welcome

Recent Forum Posts