• 🏆 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!

help with this trigger

Status
Not open for further replies.
Level 6
Joined
Oct 4, 2008
Messages
263
so, what i want my trigger to do is, deal damage to all units between two points. this 'line' of damage should be 72 wide. I tried basing this off spells, but all spells like this have a fixed range, i'd like mine to stop when the target point is reached.

thanks in advance.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
  • Set TempLoc1 = Position of (Triggering Unit)
  • Set TempLoc2 = Target Point of Ability being cast
  • Unit - Create 1 DUMMY for (Owner of (Triggering Unit)) at TempLoc1 facing TempLoc2 degrees
  • Set DUMMY = (Last created unit)
  • Unit - Order DUMMY to Move to TempLoc2
  • Unit - Add a ((Distance between TempLoc1 and TempLoc2)/(Current Movement speed of DUMMY)) Generic expiration timer to DUMMY
  • Custom script: call RemoveLocation(udg_TempLoc1)
  • Custom script: call RemoveLocation(udg_TempLoc2)
This is something you could use. You just need to add a (modded) immolation to your dummy and he damages everyone on a line ;)

If you want the distance to be only 72, replace (Distance between TempLoc1 and TempLoc2) with 72 ;)
Then it becomes:
  • Unit - Add a (72/(Current Movement speed of DUMMY)) Generic expiration timer to DUMMY
 
Level 6
Joined
Oct 4, 2008
Messages
263
vjass..... WTH is that?
Edit: could somebody please create a map implementing all that required stuff (and of course the linesegments system itself) and link it here? because i honestly dont understand how that xecast thingy works.
 
Last edited:
Level 16
Joined
Oct 12, 2008
Messages
1,570
even if we make a map for you, you will need JNGP to import it, since JNGP supports vJass,,
All you have to do is:
Download JNGP
Instal it (just unpack it and it is installed)
open NewGen WE
Create a new trigger, name it whatever you like,,
Convert the trigger to custom text
Copy the 'xebasic' library and paste it in the trigger
Create another trigger and convert to custom text again,,
Copy the 'LineSegment' library and paste in the trigger

Save your map.
Open your map with Normal WE
Test it
Go on with your map in Normal WE (BUT DO NOT TOUCH THAT CODE AGAIN)
 
Level 6
Joined
Oct 4, 2008
Messages
263
there's a problem, whenever i test the map from Newgen WE it says 'warcraft 3 ceased to function', and when i test it from normal, it just exits to the main menu instantly....
 
Level 6
Joined
Oct 4, 2008
Messages
263
i think i fixed whatever was wrong, but now my map keeps freezing at the loading screen...

i uploaded the map, can anybody try to find out hwats wrong(or if its just my computer that sucks...)
sorry for double post btw
 

Attachments

  • Munchkin.w3x
    46.5 KB · Views: 45
Level 6
Joined
Oct 4, 2008
Messages
263
damnit! is there a way to remove this bug(while still covering the map with walls)
 
Level 6
Joined
Oct 4, 2008
Messages
263
thats... not good.
i'd make the wall a tree, only the LineSegments script dont work with those...
i think i might just have to make the map smaller.... right now, its 128x128, it can easily be fit into a smaller map!
 
Level 6
Joined
Oct 4, 2008
Messages
263
if i split the triggers, i'd have to make the bossplaces array a global. since its impossible to know how big it is, that would be.... some very ugly coding. it might be needed if the trigger still lags like hell, but yeah... its a possible solution.
 
Level 14
Joined
Nov 18, 2007
Messages
816
no, since the problem is not the creation of the units itself, the problem is the fact that you try to spawn a few thousand units. Get it down to a few hundred and you might be fine, as long as your players dont have a PC older than four years or so.
 
Level 6
Joined
Oct 4, 2008
Messages
263
it all depends on my map size. and the granulation of the units. as it is now, it reaches 1521 units. which is too much. i could double the size of the units again, but they're very big already, and the way im doing the system means we would prbably get some VERY ugly dungeons.
 
Status
Not open for further replies.
Top