• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Problems with a jump trigger

Status
Not open for further replies.
Level 3
Joined
Apr 9, 2008
Messages
45
I am currently making a escape maker style map but i am having problems with the jumpers.
My trigger is based on this trigger.
The problem is it starts lagging like all hell has broken lose when i place more then 50(just some number i made up, but defiantly below 100) of these units.

This is the trigger that makes the unit "jump".
  • Red jumper
    • Events
    • Conditions
      • (Triggering unit) Equal to Escaper 0020 <gen>
    • Actions
      • Set Facing_Var = (Facing of (Triggering unit))
      • Set Escaper = (Triggering unit)
      • Unit - Add Crow Form to (Triggering unit)
      • Unit - Remove Crow Form from (Triggering unit)
      • Animation - Change (Triggering unit) flying height to 600.00 at 400.00
      • Trigger - Turn on Untitled Trigger 002 Copy <gen>
      • Wait 1.00 seconds
      • Animation - Change (Triggering unit) flying height to 0.00 at 400.00
      • Wait 1.00 seconds
      • Trigger - Turn off Untitled Trigger 002 Copy <gen>
This trigger adds the event to that trigger:
  • test
    • Events
    • Conditions
    • Actions
      • Set Jumperunitgroup = (Units of type Jumper)
      • Unit Group - Pick every unit in Jumperunitgroup and do (Actions)
        • Loop - Actions
          • Set Jumper = (Picked unit)
          • Trigger - Add to Red jumper <gen> the event (Unit - A unit comes within 175.00 of (Picked unit))
      • Custom script: call DestroyGroup( udg_Jumperunitgroup )
And this trigger creates the jumper and runs the trigger that adds the event:
  • Create stuff
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • -------- Jumper --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Acolyte 0000 <gen> is selected by (Owner of (Triggering unit))) Equal to True
        • Then - Actions
          • Unit - Create 1 Jumper for Player 1 (Red) at (Target point of issued order) facing Default building facing degrees
          • Trigger - Run test <gen> (checking conditions)
        • Else - Actions
Personally i think that to many events get added to the trigger, but i have no idea on how to bypass/fix this.

Any help is welcome :grin:
 
Level 3
Joined
Apr 9, 2008
Messages
45
Seas =)

In your "Red Jumper" Trigger you turn on/turn off the trigger "Untitled Trigger 002 Copy <gen>" <--- whats this?^^
  • Untitled Trigger 002 Copy
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Location[1] = (Position of Escaper)
      • Set Temp_Location[2] = ((Position of Escaper) offset by (Slidingspeed x 2.00) towards Facing_Var degrees)
      • Unit - Move Escaper instantly to Temp_Location[2]
      • Custom script: call RemoveLocation(udg_Temp_Location[1])
      • Custom script: call RemoveLocation(udg_Temp_Location[2])
add these, Your leaking
  • Custom Script Code: call RemoveLocation(udg_Variable name)
  • Custom Script Code: call RemoveLocation(udg_Facing_Var)
In which trigger do i need to implement these? Sorry but i just can't seem to figure it out.

use a jump system, preferable paladons in the spell section
If you would have looked, then you would have seen that mine is when a unit comes within ... range of a building/unit while his is when a certain unit uses a ability.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

I try to build your trigger for myself to see whats your problem - but I got little problem: In the Untiled Trigger you set the offset "(Slidingspeed x 2.00)"

What is "Slidingspeed"? =O (Variable? - what type) (or what?)

Edit: I got the same trigger now and let me check if it is correct - You got the Escaper. It a acrolyt enter the 175 range of Escaper - the escaper jumps up - a jumper is created - and the escaper jumps down - and even if i'm not in the 75 range anymore - jumpers are created =s ---- sry but what sense this have? =O
 
Last edited:
Level 3
Joined
Apr 9, 2008
Messages
45
Seas =)

I try to build your trigger for myself to see whats your problem - but I got little problem: In the Untiled Trigger you set the offset "(Slidingspeed x 2.00)"

What is "Slidingspeed"? =O (Variable? - what type) (or what?)

Edit: I got the same trigger now and let me check if it is correct - You got the Escaper. It a acrolyt enter the 175 range of Escaper - the escaper jumps up - a jumper is created - and the escaper jumps down - and even if i'm not in the 75 range anymore - jumpers are created =s ---- sry but what sense this have? =O

Slidingspeed is a variable of type Real.

The point is that when you order the acolyte to move somewhere a unit of type jumper is created at that point, and when another unit comes near that unit he jumps.

I attached a example map for you, it works the same as in my map but all the unnecessary stuff has been ripped out ;)
 

Attachments

  • Jumper example.w3x
    15.8 KB · Views: 109
Level 3
Joined
Apr 9, 2008
Messages
45
Dude, its not lagging?
It sure is lagging:

While on this map it doesn't lag at all (it will after a few thousand, but that doesn't matter):


I have attached the other map, it is "protected" though.
 

Attachments

  • Escape Maker - GOLDc.w3x
    160.4 KB · Views: 82
Level 12
Joined
Mar 10, 2008
Messages
869
You stealing stealer you! Give me credit! Nah, I'm fine.
You place more than 50 what? What's the thing that you are placing down?

Oh god, I think escape maker is horrible. A better example of a jumper would be 3ICE's Maze Designer or Maze Designer (by Dashival) or... Critter Slide :grin: lol.
So what are you actually trying to do? Just make the unit jump? Or are you adding in other sexy stuff? I have fully customized my jumper in many ways. I might have a solution.
 
Level 3
Joined
Apr 9, 2008
Messages
45
You stealing stealer you! Give me credit! Nah, I'm fine.
You place more than 50 what? What's the thing that you are placing down?

Oh god, I think escape maker is horrible. A better example of a jumper would be 3ICE's Maze Designer or Maze Designer (by Dashival) or... Critter Slide :grin: lol.
So what are you actually trying to do? Just make the unit jump? Or are you adding in other sexy stuff? I have fully customized my jumper in many ways. I might have a solution.

First of all, credit is in the map ;)
Second: If you would have read you would have known the problem, but the problem is that when i place to much jumpers the map starts lagging.
Third: I am not sure about the map name yet, but it is gonna be a "escape maker" style map.
 
Level 3
Joined
Apr 9, 2008
Messages
45
Could you please look at the movies in this post?
Then you would see exactly what problem i have or atleast you could see how i want it :wink:

Edit: The model is also not causing the problem, because i have tried models with animations (such as a doodad) and it still lagged just as much.
 
Level 12
Joined
Mar 10, 2008
Messages
869
Yeah, no. I don't watch youtube. Mainly my brother being bitchy about the internet while he plays World of Warcraft all day and when I download it makes him lag. Usual stuff.

Well I didn't notice it was only 25 seconds so I'll make an exception.

Jesus! Can I take a look at the triggers that creates the buggers?
(The trigger that when you right-click it creates the jumpers at the spot.)
 
Level 3
Joined
Apr 9, 2008
Messages
45
Yeah, no. I don't watch youtube. Mainly my brother being bitchy about the internet while he plays World of Warcraft all day and when I download it makes him lag. Usual stuff.

Well I didn't notice it was only 25 seconds so I'll make an exception.

Jesus! Can I take a look at the triggers that creates the buggers?
(The trigger that when you right-click it creates the jumpers at the spot.)
And this trigger creates the jumper and runs the trigger that adds the event:
  • Create stuff
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • -------- Jumper --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Acolyte 0000 <gen> is selected by (Owner of (Triggering unit))) Equal to True
        • Then - Actions
          • Unit - Create 1 Jumper for Player 1 (Red) at (Target point of issued order) facing Default building facing degrees
          • Trigger - Run test <gen> (checking conditions)
        • Else - Actions

Thanks for helping!:thumbs_up:
 
Level 12
Joined
Mar 10, 2008
Messages
869
At least you've learned that I don't use my eyes much.
Okay, you don't need the trigger "test". What that is doing is, for every jumper that is currently in the map, it will add an event, for those who already have one for as well!
Instead of doing "run Test", do:
  • Trigger - Add to Red jumper <gen> the event (Unit - A unit comes within 175.00 of (Last created unit))
And for leak fixing, create a point variable (e.g. Point) then do:
  • Set Point = Target point of issued order)
  • Unit - Create 1 jumper for Player (Red) at (Point) facing default building facing degrees
  • Custom Script: call RemoveLocation(udg_Point)
 
Status
Not open for further replies.
Top