[Trigger] Save In Variables

Status
Not open for further replies.
Allright, basically it will look something like this:


  • Pick up Weapon
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Permanent
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Sword
        • Then - Actions
          • Special Effect - Create a special effect attached to the hand,left of (Hero manipulating item) using Sword-effect
          • Set SE[(Player number of (Owner of (Triggering unit)))] = (Last created special effect)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Axe
        • Then - Actions
          • Special Effect - Create a special effect attached to the hand,left of (Hero manipulating item) using Axe-effect
          • Set SE[(Player number of (Owner of (Triggering unit)))] = (Last created special effect)
        • Else - Actions


Set all your weapons to permanent, all shields to another class, ...

Then, to remove the special effects, you can use this trigger:
  • Drop Weapon
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Permanent
    • Actions
      • Special Effect - Destroy SE[(Player number of (Owner of (Triggering unit)))]
This is just a rough sketch, but you get the bigger picture I guess.
 
Here is the screeny:
71390725.jpg


I use Windows XP, so it might look different, but I think you will find the action ;)
 
no i think he wants to know what type of variable it is.
it is a 'special effect' array called "SE"
and the indexes (Player number of (Owner of (Triggering unit))) are there to make it MPI
 
You can add a special effect (kill me if I remember how) directly to an item through the object manager. You don't need to make any triggers for this.

Argl, and NOW you say so? xD

Give the item an ability that has the art - target effect to the sword and the "Caster attachement point" to hand,left (or right).

Forgot about that :p
 
Last edited:
Status
Not open for further replies.
Back
Top