HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

making point = everywhere

09-08-2007, 08:09 PM#1
evilmapcreater
How would i make a point equal every spot in map area... like every cordinate on the map... like if i want to make a unit in every spot... or something like that... well.. this dose like horizontly

Trigger:
test Copy
Collapse Events
Map initialization
Conditions
Collapse Actions
Collapse For each (Integer A) from -3500 to 3500, do (Actions)
Collapse Loop - Actions
Set point = (Point((Real((Integer A))), (Real((Integer A)))))

any ideas?
09-08-2007, 08:35 PM#2
Captain Griffen
...learn how triggers work. Please. Look at tutorials for basic triggering.
09-08-2007, 08:36 PM#3
Ghan_04
You would basically need two loops. An Integer A loop for the X coordinates, and an Integer B loop for the Y coordinates. Put one inside the other, and then it should do that for you.
09-08-2007, 09:06 PM#4
TaintedReality
A point equals a point. A point does not equal 10000 points.
09-08-2007, 09:09 PM#5
Tide-Arc Ephemera
Just curious... but couldn't this eat up so much memory that your computer explodes?
09-08-2007, 10:29 PM#6
Rising_Dusk
Actually, your's does it in a diagonal line with slope 1 through the center of the map. Also, I can't fathom the use of resetting a single point to all of those locations. If you really need it, wouldn't loading to an array be the wiser option?

Quote:
You would basically need two loops. An Integer A loop for the X coordinates, and an Integer B loop for the Y coordinates. Put one inside the other, and then it should do that for you.
More or less, this is what should be done.
09-09-2007, 12:01 AM#7
evilmapcreater
well what im realy trying to do is make a trackable like every where and be able to detect where it was clicked... this is what did...

Trigger:
test Copy 2
Collapse Events
Map initialization
Conditions
Collapse Actions
Collapse For each (Integer A) from -3500 to 3500, do (Actions)
Collapse Loop - Actions
Collapse For each (Integer B) from -3500 to 3500, do (Actions)
Collapse Loop - Actions
Set track = (Create trackable object using path Doodads\Outland\Props\Altar\Altar.mdl at Location ((Real((Integer A))),(Real((Integer B)))) facing 0.00)
Set trackpoint = (Point((Real((Integer A))), (Real((Integer A)))))
Trigger - Add to test2 <gen> the event (Trackable Object - track is clicked)

that creats stuff along the left side of the map... what should i do?
09-09-2007, 03:56 AM#8
Rising_Dusk
Trigger:
Set trackpoint = (Point((Real((Integer A))), (Real((Integer A)))))
That's your problem.

Use this --
Trigger:
Set trackpoint = (Point((Real((Integer A))), (Real((Integer B)))))

Also, just so you know, this is probably going to smack OP limit very quickly. Consider doing this in chunks of 50 or something to keep it reasonable.
09-09-2007, 05:13 AM#9
Dil999
You will be running it 49 million times (49,000,000) If you plan to do it without hitting the op limit, I suggest you use a timer to do it over a few seconds instead of all at once.
09-09-2007, 06:40 AM#10
Deaod
How about inserting a Wait-Function into your trigger? like this?

Trigger:
Untitled Trigger 001
Collapse Events
Map initialization
Conditions
Collapse Actions
Collapse For each (Integer A) from -3500 to 3500, do (Actions)
Collapse Loop - Actions
Wait 0.20 game-time seconds
Collapse For each (Integer B) from -3500 to 3500, do (Actions)
Collapse Loop - Actions
Set track = (Create trackable object using path Doodads\Outland\Props\Altar\Altar.mdl at Location ((Real((Integer A))),(Real((Integer B)))) facing 0.00)
Set trackpoint = (Point((Real((Integer A))), (Real((Integer B)))))

It would take this function about 23 Minutes to load, if it wouldn't also take time to run one loop 7000 times.
09-09-2007, 06:48 AM#11
Dil999
Or you could do it on a 0.01 second timer, and have it take a minute and a half :P
Even better, 2 seperate timers (one negative and one positive), meaning 40 seconds or so.
09-09-2007, 05:14 PM#12
evilmapcreater
Trigger:
test
Collapse Events
Map initialization
Conditions
Collapse Actions
Collapse For each (Integer A) from -3500 to 3500, do (Actions)
Collapse Loop - Actions
Wait 0.01 seconds
Collapse For each (Integer B) from -3500 to 3500, do (Actions)
Collapse Loop - Actions
Set track = (Create trackable object using path Doodads\Outland\Props\Altar\Altar.mdl at Location ((Real((Integer A))),(Real((Integer B)))) facing 0.00)
Set trackpoint = (Point((Real((Integer A))), (Real((Integer B)))))
Trigger - Add to test2 <gen> the event (Trackable Object - track is clicked)

i did that and it still only dose it on the left side othe map. maybe i miss understood something...
09-09-2007, 06:22 PM#13
Dil999
...You cant have 0.01 second waits. You need to have 2 seperate triggers, one starting a timer and one being run when the timer expires.
09-09-2007, 07:21 PM#14
evilmapcreater
Trigger:
run test
Collapse Events
Time - Elapsed game time is 1.00 seconds
Conditions
Collapse Actions
Wait 0.20 seconds
Trigger - Run test <gen> (checking conditions)
Trigger:
test
Events
Conditions
Collapse Actions
Collapse For each (Integer A) from -3500 to 3500, do (Actions)
Collapse Loop - Actions
Collapse For each (Integer B) from -3500 to 3500, do (Actions)
Collapse Loop - Actions
Set track = (Create trackable object using path Doodads\Outland\Props\Altar\Altar.mdl at Location ((Real((Integer A))),(Real((Integer B)))) facing 0.00)
Set trackpoint = (Point((Real((Integer A))), (Real((Integer A)))))
Trigger - Add to test2 <gen> the event (Trackable Object - track is clicked)

this dose the same thing? what should i do? i think i misunderstood again...
09-09-2007, 07:51 PM#15
Captain Griffen
Waits won't go under ~0.1 seconds.