he was saying if i did it the way i did it before...where saved each actor in the variable and used that variable to delete them later....
but omfg this works perfectly lol lol lol. but instead of moving the actual point i did this
Variable - Set PointOffset = 0.2
General - If (Conditions) then do (Actions) else do (Actions)
If
PL: IsPathRunning[Index] == true
Then
General - Pick each integer from 0 to PL: Count[Index], and do (Actions)
Actions
Actor - Send message "Destroy" to actor PL: Actor[Index][(Picked integer)]
Else
Variable - Set PL: Count[Index] = 0
Variable - Set PL: IsPathRunning[Index] = true
General - While (Conditions) are true, do (Actions)
Conditions
PL: IsPathRunning[Index] == true
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Distance between LightSpawnMid and MoveMidPoint2) < 4.0
Then
Variable - Set PL: IsPathRunning[Index] = false
Variable - Set PL: Count[Index] = 0
Else
Point - Move LightSpawnMid To (LightSpawnMid offset by PointOffset towards MoveMidPoint2)
Actor - Create actor model PL: LightTypes[Index] at point LightSpawnMid
Variable - Set PL: Actor[Index][PL: Count[Index]] = (Last created actor)
Variable - Modify PL: Count[Index]: + 1
Variable - Modify PointOffset: + 0.1
im still gonna store the points for now till i add the actor events to destroy them a set number a seconds later....
EDIT: w00t w00t thx for all ur help guys...this is perfect...the lights are spaced WAY better. they stop when they are supposed to...u can still put a delay in if u want so they dont just instantly spawn the line...perfect..thx again everyone. hopefully ill have a decent map here in the next couple months to show yall :-) Getting better at it everyday.
A simple curve would require a variable to store the current tangent of the line. So you would start at, say, 90 degrees. Create a global real variable called TANGENT and set it to 90 degrees in your trigger, somewhere before the loop begins. Then when you go to move your point with the polar offset, set the direction to your variable TANGENT. Then immediately set Tangent == Tangent + 1 (or -1, depending on which way the curve should go.) The number you add or subtract is the severity of the curve, so change that however you need it. You can use a "Repeat x times" loop to change the length of the curve if you don't want to end it at a specific location.
And again thx...this is going to make this light path function awesome...iv got alot of work to do though lol. Gonna be a loooooonggg night.
Okay so im running into a problem this is just to test it works...down to its most simplest i could make it. the first section is just calling the create string function which creates the lights between 2 points which is the second....now it works fine the first time but the second time i run it....its like the moved points are still there and it creates overlaps of lights over the parts that it goes over more often....IE: the last couple because its always moving the points toward the end. It always deletes the lights but it takes longer and longer and longer each time as its duplicating the amount of lights its generating each time. so basically it'll keep getting brighter until the game cant handle it and crashes. I dont get why this is happening. Im really confused. I know this seems a trivial thing to spend this much time on...but i plan on using the points method to do some other things iv been wanting to do...but i need to get it to work correctly first lol. anyways take a look and see if yall have any idea. Also if u need to see whats going on in the map lemme know and ill post or publish
Game - Player Any Player types a chat message containing "go", matching Exactly
Point - Move MoveFrontPoint4 To PL; Origanal Point[5][1]
General - Wait for (Conditions), checking every 1.0 Real Time seconds
Conditions
IsStringRunning[1] == false
General - Pick each integer from 0 to PL: BlinkCount[1], and do (Actions)
Actions
General - Wait 0.1 Real Time seconds
Actor - Kill actor model PL: BlinkActor[1][(Picked integer)]
Actor - Send message "Destroy" to actor PL: BlinkActor[1][(Picked integer)]
CreateString
Options: Action
Return Type: (None)
Parameters
Index = 0 <Integer>
Point 1 = No Point <Point>
Point 2 = No Point <Point>
LightType = No Game Link <Game Link - Model>
Delay = 0.0 <Real>
Offset = 0.0 <Real>
Grammar Text: CreateString(Index, Point 1, Point 2, LightType, Delay, Offset)
Hint Text: (None)
Custom Script Code
Local Variables
Actions
Variable - Set IsStringRunning[Index] = true
General - While (Conditions) are true, do (Actions)
Conditions
(Distance between Point 1 and Point 2) >= 1.0
Actions
General - Wait Delay Real Time seconds
Point - Move Point 1 To (Point 1 offset by Offset towards Point 2)
Actor - Create actor model LightType at point Point 1
Variable - Set PL: BlinkActor[Index][PL: BlinkCount[Index]] = (Last created actor)
Variable - Modify PL: BlinkCount[Index]: + 1
Actor - Create actor model LightType at point Point 1
Variable - Set PL: BlinkActor[Index][PL: BlinkCount[Index]] = (Last created actor)
Variable - Modify PL: BlinkCount[Index]: + 1
Variable - Set IsStringRunning[Index] = false
Also i never figured out how to get any of this to work using the data editor...tried the kill timer thing...no idea what im doing...somethings in the data editor i have no problems with but when i start jumping around and trying a bunch of random stuff i get lost.
Hmm how'd I miss this post. Well anyway, I want to point out that using actors/doodads for the lights is probably better than using units. Actors consume less overhead and are probably much more efficient to have 2000 of them rather than 2000 units.
@SouLCarveRR: Go
he was saying if i did it the way i did it before...where saved each actor in the variable and used that variable to delete them later....
but omfg this works perfectly lol lol lol. but instead of moving the actual point i did this
Variable - Set PointOffset = 0.2
General - If (Conditions) then do (Actions) else do (Actions)
If
PL: IsPathRunning[Index] == true
Then
General - Pick each integer from 0 to PL: Count[Index], and do (Actions)
Actions
Actor - Send message "Destroy" to actor PL: Actor[Index][(Picked integer)]
Else
Variable - Set PL: Count[Index] = 0
Variable - Set PL: IsPathRunning[Index] = true
General - While (Conditions) are true, do (Actions)
Conditions
PL: IsPathRunning[Index] == true
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Distance between LightSpawnMid and MoveMidPoint2) < 4.0
Then
Variable - Set PL: IsPathRunning[Index] = false
Variable - Set PL: Count[Index] = 0
Else Point - Move LightSpawnMid To (LightSpawnMid offset by PointOffset towards MoveMidPoint2)
Actor - Create actor model PL: LightTypes[Index] at point LightSpawnMid
Variable - Set PL: Actor[Index][PL: Count[Index]] = (Last created actor)
Variable - Modify PL: Count[Index]: + 1
Variable - Modify PointOffset: + 0.1
im still gonna store the points for now till i add the actor events to destroy them a set number a seconds later....
EDIT: w00t w00t thx for all ur help guys...this is perfect...the lights are spaced WAY better. they stop when they are supposed to...u can still put a delay in if u want so they dont just instantly spawn the line...perfect..thx again everyone. hopefully ill have a decent map here in the next couple months to show yall :-) Getting better at it everyday.
And again thx...this is going to make this light path function awesome...iv got alot of work to do though lol. Gonna be a loooooonggg night.
Okay so im running into a problem this is just to test it works...down to its most simplest i could make it. the first section is just calling the create string function which creates the lights between 2 points which is the second....now it works fine the first time but the second time i run it....its like the moved points are still there and it creates overlaps of lights over the parts that it goes over more often....IE: the last couple because its always moving the points toward the end. It always deletes the lights but it takes longer and longer and longer each time as its duplicating the amount of lights its generating each time. so basically it'll keep getting brighter until the game cant handle it and crashes. I dont get why this is happening. Im really confused. I know this seems a trivial thing to spend this much time on...but i plan on using the points method to do some other things iv been wanting to do...but i need to get it to work correctly first lol. anyways take a look and see if yall have any idea. Also if u need to see whats going on in the map lemme know and ill post or publish
Game - Player Any Player types a chat message containing "go", matching Exactly
Local Variables
Conditions
Actions
Variable - Set PL: BlinkCount[1] = 0
CreateString(1, LightSpawnFront, MoveFrontPoint1, PL: BlinkLightTypes[1], 0.1, 5.0)
Point - Move LightSpawnMid To PL; Origanal Point[1][1]
General - Wait for (Conditions), checking every 1.0 Real Time seconds
Conditions
IsStringRunning[1] == false
CreateString(1, MoveFrontPoint1, MoveFrontPoint2, PL: BlinkLightTypes[1], 0.05, 2.0)
Point - Move MoveFrontPoint1 To PL; Origanal Point[2][1]
General - Wait for (Conditions), checking every 1.0 Real Time seconds
Conditions
IsStringRunning[1] == false
CreateString(1, MoveFrontPoint2, MoveFrontPoint3, PL: BlinkLightTypes[1], 0.05, 3.0)
Point - Move MoveFrontPoint2 To PL; Origanal Point[3][1]
General - Wait for (Conditions), checking every 1.0 Real Time seconds
Conditions IsStringRunning[1] == false
CreateString(1, MoveFrontPoint3, MoveFrontPoint4, PL: BlinkLightTypes[1], 0.05, 1.0)
Point - Move MoveFrontPoint3 To PL; Origanal Point[4][1]
General - Wait for (Conditions), checking every 1.0 Real Time seconds
Conditions
IsStringRunning[1] == false
CreateString(1, MoveFrontPoint4, LightEndFront, PL: BlinkLightTypes[1], 0.05, 1.0)
Point - Move MoveFrontPoint4 To PL; Origanal Point[5][1]
General - Wait for (Conditions), checking every 1.0 Real Time seconds
Conditions
IsStringRunning[1] == false
General - Pick each integer from 0 to PL: BlinkCount[1], and do (Actions)
Actions
General - Wait 0.1 Real Time seconds
Actor - Kill actor model PL: BlinkActor[1][(Picked integer)]
Actor - Send message "Destroy" to actor PL: BlinkActor[1][(Picked integer)]
CreateString
Options: Action
Return Type: (None)
Parameters
Index = 0 <Integer>
Point 1 = No Point <Point>
Point 2 = No Point <Point>
LightType = No Game Link <Game Link - Model>
Delay = 0.0 <Real>
Offset = 0.0 <Real>
Grammar Text: CreateString(Index, Point 1, Point 2, LightType, Delay, Offset)
Hint Text: (None)
Custom Script Code
Local Variables
Actions
Variable - Set IsStringRunning[Index] = true
General - While (Conditions) are true, do (Actions)
Conditions
(Distance between Point 1 and Point 2) >= 1.0 Actions
General - Wait Delay Real Time seconds
Point - Move Point 1 To (Point 1 offset by Offset towards Point 2)
Actor - Create actor model LightType at point Point 1
Variable - Set PL: BlinkActor[Index][PL: BlinkCount[Index]] = (Last created actor)
Variable - Modify PL: BlinkCount[Index]: + 1
Actor - Create actor model LightType at point Point 1
Variable - Set PL: BlinkActor[Index][PL: BlinkCount[Index]] = (Last created actor)
Variable - Modify PL: BlinkCount[Index]: + 1
Variable - Set IsStringRunning[Index] = false
Also i never figured out how to get any of this to work using the data editor...tried the kill timer thing...no idea what im doing...somethings in the data editor i have no problems with but when i start jumping around and trying a bunch of random stuff i get lost.
no one have any ideas?
hey syn
I basically do the same stuff in my td....
I think your getting hung up on the ... inner workings of the whole concept a bit too much...
If youd like to chat directly with me some time I can prolly help you work out what your working towards in a cleaner fashion
shoot me a pm on here if you want and we can chat on irc or skype or something if you like
Hmm how'd I miss this post. Well anyway, I want to point out that using actors/doodads for the lights is probably better than using units. Actors consume less overhead and are probably much more efficient to have 2000 of them rather than 2000 units.
Synik, would you mind posting or PMing your map to me? It would be easier for me to look at it that way.
Okay so here a pic of what i have soul