Making a spell MPI (GUI)

whoopwhoop

Cool Member
Reaction score
1
EDIT: ok, last problem got fixed but now I have a new problem with a spell.

One of the heroes in the map has an ability that's based on Aerial Shackles, but I made a trigger so that it also pulls the targeted unit towards the caster.

When I cast it on a unit it works fine and it's MPI too now, but when I cast it on a unit and then cast it with another hero (owned by a different player) on that same unit it pulls the unit towards the location of the previous caster. And I don't understand why...

These are the triggers:
Trigger:
  • Soul Extraction
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Soul Extraction (Demon Lord)
    • Actions
      • Set Unit_SE[(Player number of (Triggering player))] = (Triggering unit)
      • Set TUnit_SE[(Player number of (Triggering player))] = (Target unit of ability being cast)
      • Set Point1_SE[(Player number of (Triggering player))] = (Position of (Triggering unit))
      • Set Point2_SE[(Player number of (Triggering player))] = (Position of (Target unit of ability being cast))
      • Set Real2_SE[(Player number of (Triggering player))] = ((Distance between Point1_SE[(Player number of (Triggering player))] and Point2_SE[(Player number of (Triggering player))]) x -0.03)
      • Set Boolean_SE[(Player number of (Triggering player))] = False
      • Unit - Turn collision for TUnit_SE[(Player number of (Triggering player))] Off
      • Trigger - Turn on OO Soul Extraction Pull <gen>

Trigger:
  • OO Soul Extraction Pull
    • Events
      • Time - Every 0.06 seconds of game time
    • Conditions
    • Actions
      • Set Integer[1] = 0
        • Do Multiple ActionsFor each (Integer A) from 1 to 12, do (Actions)
          • Loop - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsAnd - All (Conditions) are true
                  • Conditions
                    • (TUnit_SE[(Integer A)] has buff Soul Extraction ) Equal to (==) True
                    • Boolean_SE[(Integer A)] Equal to (==) False
                    • (Unit_SE[(Integer A)] is alive) Equal to (==) True
                    • (TUnit_SE[(Integer A)] is alive) Equal to (==) True
              • Then - Actions
                • Set Point[1] = (Position of Unit_SE[(Integer A)])
                • Set Point[2] = (Position of TUnit_SE[(Integer A)])
                • Set Real[1] = (Angle from Point1_SE[(Integer A)] to Point[2])
                • Set Point[3] = (Point[2] offset by Real2_SE[(Integer A)] towards Real[1] degrees)
                • Unit - Move TUnit_SE[(Integer A)] instantly to Point[3]
                • Set Point[2] = (Position of TUnit_SE[(Integer A)])
                  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Distance between Point[1] and Point[2]) Less than (<) 120.00
                    • Then - Actions
                      • Set Boolean_SE[(Integer A)] = True
                    • Else - Actions
                • Set Point[1] = (Position of No unit)
                • Custom script: call RemoveLocation (udg_Point[1])
                • Custom script: call RemoveLocation (udg_Point[2])
                • Custom script: call RemoveLocation (udg_Point[3])
              • Else - Actions
                • Unit - Turn collision for TUnit_SE[(Integer A)] On
                • Set Integer[1] = (Integer[1] + 1)
                  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Integer[1] Equal to (==) 12
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                    • Else - Actions

Anyone know what it is that cause the unit to move to the location of the previous caster?
 

Imp Midna

Active Member
Reaction score
52
Trigger:
  • Set Integer_GP[(Player number of (Triggering player))] = (2 + (2 x (Level of (Ability being cast) for (Triggering unit))))

Trigger:
  • Integer2_GP[(Integer A)] Less than or equal to (<=) Integer1_GP[(Integer A)]


Asuming Integer_GP is supposed to be what Integer1_GP is asumed to be, as i can not see any occurence of Integer1_GP in the triggers.
 

whoopwhoop

Cool Member
Reaction score
1
Trigger:
  • Set Integer_GP[(Player number of (Triggering player))] = (2 + (2 x (Level of (Ability being cast) for (Triggering unit))))

Trigger:
  • Integer2_GP[(Integer A)] Less than or equal to (<=) Integer1_GP[(Integer A)]


Asuming Integer_GP is supposed to be what Integer1_GP is asumed to be, as i can not see any occurence of Integer1_GP in the triggers.
What... How did that even happen? I just checked the variables and there's no integer_GP variable, only integer1_GP and integer2_GP.. I fixed it and it works now. Thanks!
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
change all those triggering players to owner of triggering unit
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
a unit caused the event so there is no triggering player. All the parts calling for a triggering player are not working, simply change it over to player number owner of triggering unit and your spell should work,

This should make it easier to understand open up worldeditor and add 2 regions then make these triggers.
Trigger:
  • Untitled Trigger 003 Copy
    • Events
    • Map initialization
    • Conditions
    • Actions
    • For each (Integer A) from 1 to 8, do (Actions)
    • Loop - Actions
    • Unit - Create 1 Paladin for (Player((Integer A))) at (Center of Region 012 <gen>) facing Default building facing degrees

Trigger:
  • Untitled Trigger 003
    • Events
    • Unit - A unit enters Region 012 <gen>
    • Unit - A unit enters Region 013 <gen>
    • Conditions
    • Actions
    • Game - Display to (All players) the text: (String((Player number of (Triggering player))))
    • Wait 1.00 seconds
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Region 012 <gen> contains (Triggering unit)) Equal to True
    • Then - Actions
    • Unit - Order (Entering unit) to Move To (Center of Region 013 <gen>)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Region 013 <gen> contains (Triggering unit)) Equal to True
    • Then - Actions
    • Unit - Order (Entering unit) to Move To (Center of Region 012 <gen>)
    • Else - Actions

The Only text you will receive is a bunch of ones, which will make the ability not MPI
 

whoopwhoop

Cool Member
Reaction score
1
a unit caused the event so there is no triggering player. All the parts calling for a triggering player are not working, simply change it over to player number owner of triggering unit and your spell should work,

This should make it easier to understand open up worldeditor and add 2 regions then make these triggers.
Trigger:
  • Untitled Trigger 003 Copy
    • Events
    • Map initialization
    • Conditions
    • Actions
    • For each (Integer A) from 1 to 8, do (Actions)
    • Loop - Actions
    • Unit - Create 1 Paladin for (Player((Integer A))) at (Center of Region 012 <gen>) facing Default building facing degrees

Trigger:
  • Untitled Trigger 003
    • Events
    • Unit - A unit enters Region 012 <gen>
    • Unit - A unit enters Region 013 <gen>
    • Conditions
    • Actions
    • Game - Display to (All players) the text: (String((Player number of (Triggering player))))
    • Wait 1.00 seconds
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Region 012 <gen> contains (Triggering unit)) Equal to True
    • Then - Actions
    • Unit - Order (Entering unit) to Move To (Center of Region 013 <gen>)
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Region 013 <gen> contains (Triggering unit)) Equal to True
    • Then - Actions
    • Unit - Order (Entering unit) to Move To (Center of Region 012 <gen>)
    • Else - Actions

The Only text you will receive is a bunch of ones, which will make the ability not MPI

Alright, so I just tested this trigger, and it doesn't work like you said it would.

But when I put
Trigger:
  • Game - Display to (All players) the text: (String((Player number of (Triggering player))))

in the trigger of my spell it does however give the right number, and when I force them to cast it at the same time it also works. I'm confused now.
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
That trigger is just to show that triggering player wont work on a unit even, no matter what player owns the unit that enters the region it will give you a 1 [default value] cause the player number of triggering player is a player activated event and the unit enters region is a unit activated event.

The first trigger makes you 1 paladin for each player 1-8, the 2nd trigger makes them run back and forth between the regions then says what number player owns the unit, it should read out 1, 2 ,3 ,4, and so on, however it wont do this cause player number of triggering player was used in it. Since it is a unit even and not a player there is no triggering player so it will give you the default. However if you use player number owner of triggering/entering unit it will work fine since it is a unit event.

If you want it to be MUI instead of MPI you are going to have to go a step further and set custom values on the units. For that you are going to need to make a [integer variable array] and every time it casts a spell have it set unit custom value = IVA then set IVA [player number of triggering unit] = IVA [player number of triggering unit] + 1 then just call on the units custom value in the trigger.
 

whoopwhoop

Cool Member
Reaction score
1
That trigger is just to show that triggering player wont work on a unit even, no matter what player owns the unit that enters the region it will give you a 1 [default value] cause the player number of triggering player is a player activated event and the unit enters region is a unit activated event.

The first trigger makes you 1 paladin for each player 1-8, the 2nd trigger makes them run back and forth between the regions then says what number player owns the unit, it should read out 1, 2 ,3 ,4, and so on, however it wont do this cause player number of triggering player was used in it. Since it is a unit even and not a player there is no triggering player so it will give you the default. However if you use player number owner of triggering/entering unit it will work fine since it is a unit event.

If you want it to be MUI instead of MPI you are going to have to go a step further and set custom values on the units. For that you are going to need to make a [integer variable array] and every time it casts a spell have it set unit custom value = IVA then set IVA [player number of triggering unit] = IVA [player number of triggering unit] + 1 then just call on the units custom value trigger.

Ahh right.

I probably won't make it MUI, the map doesn't really allow people to have more than 1 hero.

Thanks for helping.
 

whoopwhoop

Cool Member
Reaction score
1
Alright, I have a new problem now, and it's kinda about the same thing but with a different spell:

One of the heroes in the map has an ability that's based on Aerial Shackles, but I made a trigger so that it also pulls the targeted unit towards the caster.

When I cast it on a unit it works fine and it's MPI too now, but when I cast it on a unit and then cast it with another hero (owned by a different player) on that same unit (afterwards) it pulls the unit towards the location of the previous caster. And I don't understand why...

These are the triggers:
Trigger:
  • O Soul Extraction
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Soul Extraction (Demon Lord)
    • Actions
      • Set Unit_SE[(Player number of (Triggering player))] = (Triggering unit)
      • Set TUnit_SE[(Player number of (Triggering player))] = (Target unit of ability being cast)
      • Set Point1_SE[(Player number of (Triggering player))] = (Position of (Triggering unit))
      • Set Point2_SE[(Player number of (Triggering player))] = (Position of (Target unit of ability being cast))
      • Set Real2_SE[(Player number of (Triggering player))] = ((Distance between Point1_SE[(Player number of (Triggering player))] and Point2_SE[(Player number of (Triggering player))]) x -0.03)
      • Set Boolean_SE[(Player number of (Triggering player))] = False
      • Unit - Turn collision for TUnit_SE[(Player number of (Triggering player))] Off
      • Trigger - Turn on OO Soul Extraction Pull <gen>

Trigger:
  • OO Soul Extraction Pull
    • Events
      • Time - Every 0.06 seconds of game time
    • Conditions
    • Actions
      • Set Integer[1] = 0
        • Do Multiple ActionsFor each (Integer A) from 1 to 12, do (Actions)
          • Loop - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsAnd - All (Conditions) are true
                  • Conditions
                    • (TUnit_SE[(Integer A)] has buff Soul Extraction ) Equal to (==) True
                    • Boolean_SE[(Integer A)] Equal to (==) False
                    • (Unit_SE[(Integer A)] is alive) Equal to (==) True
                    • (TUnit_SE[(Integer A)] is alive) Equal to (==) True
              • Then - Actions
                • Set Point[1] = (Position of Unit_SE[(Integer A)])
                • Set Point[2] = (Position of TUnit_SE[(Integer A)])
                • Set Real[1] = (Angle from Point1_SE[(Integer A)] to Point[2])
                • Set Point[3] = (Point[2] offset by Real2_SE[(Integer A)] towards Real[1] degrees)
                • Unit - Move TUnit_SE[(Integer A)] instantly to Point[3]
                • Set Point[2] = (Position of TUnit_SE[(Integer A)])
                  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Distance between Point[1] and Point[2]) Less than (<) 120.00
                    • Then - Actions
                      • Set Boolean_SE[(Integer A)] = True
                    • Else - Actions
                • Set Point[1] = (Position of No unit)
                • Custom script: call RemoveLocation (udg_Point[1])
                • Custom script: call RemoveLocation (udg_Point[2])
                • Custom script: call RemoveLocation (udg_Point[3])
              • Else - Actions
                • Unit - Turn collision for TUnit_SE[(Integer A)] On
                • Set Integer[1] = (Integer[1] + 1)
                  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Integer[1] Equal to (==) 12
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                    • Else - Actions

Anyone know what it is that cause the unit to move to the location of the previous caster?

I know Point1_SE and Point2_SE leak, but I just added those to see if it would fix it, but it didn't.
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
you are using triggering player on a unit event again. :p
 

whoopwhoop

Cool Member
Reaction score
1
you are using triggering player on a unit event again. :p

Alright, I changed that now, but it still doesn't work correctly.

Trigger:
  • O Soul Extraction
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Soul Extraction (Demon Lord)
    • Actions
      • Set Unit_SE[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Set TUnit_SE[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
      • Set Point1_SE[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
      • Set Point2_SE[(Player number of (Owner of (Triggering unit)))] = (Position of (Target unit of ability being cast))
      • Set Real2_SE[(Player number of (Owner of (Triggering unit)))] = ((Distance between Point1_SE[(Player number of (Owner of (Triggering unit)))] and Point2_SE[(Player number of (Owner of (Triggering unit)))]) x -0.03)
      • Set Boolean_SE[(Player number of (Owner of (Triggering unit)))] = False
      • Unit - Turn collision for TUnit_SE[(Player number of (Owner of (Triggering unit)))] Off
      • Trigger - Turn on OO Soul Extraction Pull <gen>
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Point2_SE[(Player number of (Owner of (Triggering unit)))]) x -0.03)
I am not sure but the * -0.03 might be the problem :p
When using negatives in multiples it you have 1 negative and 1 positive then the results will always be a negative.
 

whoopwhoop

Cool Member
Reaction score
1
Point2_SE[(Player number of (Owner of (Triggering unit)))]) x -0.03)
I am not sure but the * -0.03 might be the problem :p
When using negatives in multiples it you have 1 negative and 1 positive then the results will always be a negative.

If the minus isn't there it pushes the unit away instead of pulling it towards the caster.

I think the problem is with the point[3] variable and the real2_SE variable, but I can't figure out what's wrong with it.

EDIT: Well I guess I could always just make a separate trigger for each player...
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
just noticed some thing.
Event unit starts the effect of an ability.
triggering unit = the unit being effected by the ability hence being the target.
Targeted unit = the target of the ability.
so unit_se and tunit_se are being set to the same unit.
 

whoopwhoop

Cool Member
Reaction score
1
just noticed some thing.
Event unit starts the effect of an ability.
triggering unit = the unit being effected by the ability hence being the target.
Targeted unit = the target of the ability.
so unit_se and tunit_se are being set to the same unit.
Nope, doesn't fix it. :/

The ability works, but when I use it on an unit that has already been hit by the ability by an other player it moves to the location of the hero that other player has.
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
can you post the trigger how you have it set right now?
 

whoopwhoop

Cool Member
Reaction score
1
can you post the trigger how you have it set right now?

I'll just post the map:

I think I figured out what causes it.
If you stop casting the spell, while its still being pushed it goes wrong.

So in order to recreate it what you do is:
1. cast aerial shackles with paladin 1
2. break the shackles while its being pulled
3. cast aerial shackles with paladin 2


It seems to actually work sometimes though, so you might have to give it a couple of tries.
 

Attachments

  • spell.w3x
    22.6 KB · Views: 236

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Try this out and tell me what you think.
This one was a little tricky cause a single trigger can only run so many actions before it kills it's self.
 

Attachments

  • spell altered.w3x
    22.2 KB · Views: 236

whoopwhoop

Cool Member
Reaction score
1
Try this out and tell me what you think.
This one was a little tricky cause a single trigger can only run so many actions before it kills it's self.

Wow, thanks this works really well! Too bad it's not as smooth as the other triggers, but this makes it looks like it's more of a struggle for the hero to pull them in. :p

Thank you!
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/

      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