Steal Trigger!

Da_HP_Geek

New Member
Reaction score
8
Hi!

I have imported this spell to my map! First it stole items as well and I haven't removed everything from that because I dont know how ^^ I am speaking of the "If" action.

One thing more, instead of stealing 100 x level gold, that is pretty much on my map, I want it to steal 0-100/0-200/0-300 instead. But I haven't the knowledge how to do it. The best would be if you made it in a map for me, that would save me 20-30 minutes, instead of figure out where I find all actions. Thx in advance!

Trigger:
  • steal
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Steal *
    • Actions
      • Set StealDropper = (Target unit of ability being cast)
      • Set Stealer = (Triggering unit)
      • Set StealLevel = (Level of Steal * for Stealer)
      • If (((StealLevel - StealItemCount) x 100) Greater than ((Owner of StealDropper) Current gold)) then do (Set StealGoldCount = ((Owner of StealDropper) Current gold)) else do (Set StealGoldCount = ((StealLevel - StealItemCount) x 100))
      • Player - Add StealGoldCount to (Owner of Stealer) Current gold
      • Player - Add (StealGoldCount x -1) to (Owner of StealDropper) Current gold
      • Special Effect - Create a special effect attached to the overhead of StealDropper using UI\Feedback\GoldCredit\GoldCredit.mdl
      • Floating Text - Create floating text that reads (String(StealGoldCount)) above StealDropper with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
      • Set StealText = (Last created floating text)
      • Wait 2.00 seconds
      • Floating Text - Destroy StealText
      • Set StealGoldCount = 0
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
I don't understand your first issue so here's the fix to the second one:

Trigger:
  • steal
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Steal *
    • Actions
      • Set StealDropper = (Target unit of ability being cast)
      • Set Stealer = (Triggering unit)
      • Set StealLevel = (Level of Steal * for Stealer)
      • Set StealGoldCount = Random Integer Number from 1 to (Level x 100)
      • If StealGoldCount Greater than ((Owner of StealDropper) Current gold)) then do (Set StealGoldCount = ((Owner of StealDropper) Current gold)) else do Do Nothing
      • Player - Add StealGoldCount to (Owner of Stealer) Current gold
      • Player - Add (StealGoldCount x -1) to (Owner of StealDropper) Current gold
      • Special Effect - Create a special effect attached to the overhead of StealDropper using UI\Feedback\GoldCredit\GoldCredit.mdl
      • Floating Text - Create floating text that reads (String(StealGoldCount)) above StealDropper with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
      • Set StealText = (Last created floating text)
      • Wait 2.00 seconds
      • Floating Text - Destroy StealText


You do know this is not MUI though, right? Nor is it MPI.
 

GooS

Azrael
Reaction score
154
Just remove the wait and destroy and add these instead:

Trigger:
  • Actions
    • Floating Text - Change (Last created floating text): Disable permanence
    • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds


Should make it rather MUI shouldn't it? unless ive missed something in the trigger.

//==GooS

Edit: after reading a bit more, the variable StealGoldCount isn't set in that trigger.

Trigger:
  • Actions
    • Set StealGoldCount = (Random integer number between 0 and (StealLevel x 100))


Would make it between 0-100/0-200/0-300 for level 1/2/3.

Edit2: noticed bob had already added that :)
 

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
Just remove the wait and destroy and add these instead:

Trigger:
  • Actions
    • Floating Text - Change (Last created floating text): Disable permanence
    • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds


Should make it rather MUI shouldn't it? unless ive missed something in the trigger.

//==GooS


Absolutely, no wait = Mui
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top