HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Extreme de-loading time...

04-02-2004, 07:44 PM#1
Quetz
Every time I play a map I am making, I experience little to no lag in game. However, once I quit the game, it takes around five minutes for me to go from the score board to the chat channels. Any real reason for this?

My map is a first person view shooting game, and currently it is not really all that big. Just looking to fix this problem.

Also, with my arrow key movement, I used the system written up by Hunter1000. This system works fine for player 1(red), but for any other player the system doesn't hold.

Example : You're blue, you hit and hold up arrow. Your guy only moves forward a small amount, and then stops.

I really need it so that you can just hold the button down and your guy will move. If theres a way to fix this, or if you need to see the movement trigger because you can't find hunter1000's topic, just tell me.
04-02-2004, 07:58 PM#2
johnfn
Quote:
Originally Posted by Quetz
... or if you need to see the movement trigger ...

Yup, we do. Otherwise we have no idea whats going on, and thus have no idea how to fix it. I dont know why there is a 5 minute de-loading time, though.
04-02-2004, 08:12 PM#3
Quetz
Quote:
Originally Posted by johnfn
Yup, we do. Otherwise we have no idea whats going on, and thus have no idea how to fix it. I dont know why there is a 5 minute de-loading time, though.

I think it might be that theres so many positions in the game for it to remember, I remember th15 saying something about this happeneing in his tank wars map. Give me a second, Ill post all of the triggers for movement and one of the camera triggers.
04-02-2004, 08:19 PM#4
Quetz
Quote:
Originally Posted by Quetz
HitLeft
Events
Conditions
Actions
Set Left[(Player number of (Triggering player))] = True
Trigger - Run TurnLeft <gen> (checking conditions)
Trigger - Run TurnRight <gen> (checking conditions)
Trigger - Run MoveForward <gen> (checking conditions)

I have one of this trigger for each direction.

Quote:
Originally Posted by Quetz
ReleaseLeft
Events
Conditions
Actions
Set Left[(Player number of (Triggering player))] = False

Same as above.

Quote:
Originally Posted by Quetz
TurnLeft
Events
Time - Every 0.20 seconds of game time
Conditions
Left[(Player number of (Triggering player))] Equal to True
Right[(Player number of (Triggering player))] Equal to False
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Up[(Player number of (Triggering player))] Equal to True
Then - Actions
Unit - Order Character[(Player number of (Triggering player))] to Move To ((Position of Character[(Player number of (Triggering player))]) offset by 75.00 towards ((Facing of Character[(Player number of (Triggering player))]) + 10.00) degrees)
Else - Actions
Unit - Make Character[(Player number of (Triggering player))] face ((Facing of Character[(Player number of (Triggering player))]) + 10.00) over 0.10 seconds

Same deal here, barring the obvious differences of each direction.

Quote:
Originally Posted by Quetz
Setup
Events
Map initialization
Conditions
Actions
Visibility - Disable fog of war
Visibility - Disable black mask
For each (Integer A) from 1 to 12, do (Trigger - Add to HitLeft <gen> the event (Player - (Player((Integer A))) Presses the Left Arrow key))
For each (Integer A) from 1 to 12, do (Trigger - Add to HitRight <gen> the event (Player - (Player((Integer A))) Presses the Right Arrow key))
For each (Integer A) from 1 to 12, do (Trigger - Add to ReleaseLeft <gen> the event (Player - (Player((Integer A))) Releases the Left Arrow key))
For each (Integer A) from 1 to 12, do (Trigger - Add to ReleaseRight <gen> the event (Player - (Player((Integer A))) Releases the Right Arrow key))
For each (Integer A) from 1 to 12, do (Trigger - Add to ReleaseUp <gen> the event (Player - (Player((Integer A))) Releases the Up Arrow key))
For each (Integer A) from 1 to 12, do (Trigger - Add to HitUp <gen> the event (Player - (Player((Integer A))) Presses the Up Arrow key))
For each (Integer A) from 1 to 12, do (Trigger - Add to HitDown <gen> the event (Player - (Player((Integer A))) Presses the Down Arrow key))
For each (Integer A) from 1 to 12, do (Trigger - Add to ReleaseDown <gen> the event (Player - (Player((Integer A))) Releases the Down Arrow key))
Set Character[1] = Metal Marine 0010 <gen>
Set Character[2] = Metal Marine 0013 <gen>
Set Character[3] = Metal Marine 0014 <gen>
Set Character[6] = Metal Marine 0015 <gen>
Set Character[7] = Metal Marine 0016 <gen>
Set Character[9] = Metal Marine 0017 <gen>
Set Character[10] = Metal Marine 0023 <gen>
Set Character[11] = Metal Marine 0024 <gen>
Set Character[12] = Metal Marine 0025 <gen>

This is, obviously, what makes the other ones work.

And now one of the camera triggers:

Quote:
Originally Posted by Quetz
CamLock Red
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Camera - Apply Camera 001 Copy <gen> for Player 1 (Red) over 0.20 seconds
Camera - Set Player 1 (Red)'s camera Rotation to (Facing of Metal Marine 0010 <gen>) over 0.00 seconds
Camera - Set Player 1 (Red)'s camera Height Offset to ((Real((Terrain cliff level at (Position of Character[1])))) x (90.00 - 50.00)) over 0.00 seconds
Camera - Lock camera target for Player 1 (Red) to Metal Marine 0010 <gen>, offset by (0.00, 0.00) using The unit's rotation
Camera - Pan camera for Player 1 (Red) to ((Position of Metal Marine 0010 <gen>) offset by 80.00 towards (Facing of Metal Marine 0010 <gen>) degrees) over 0.00 seconds
Camera - Set Player 1 (Red)'s camera Distance to target to -250.00 over 0.00 seconds
Camera - Change camera smoothing factor to 300.00

Let me know if I can do anything else if you need it.
04-02-2004, 10:02 PM#5
johnfn
I dont like big triggers (shiver) but your trigger looks pretty sound. My best idea would be to debug it using game- display message to character. You should just display various results when certain actions happen.

Thats the best help i can give... Have you already debugged? what happened? If your in the dark about debugging, i can help.

I hope this helps... I never like it when there's a trigger i cant figure out :///...


Edit: BTW, a better way to post code is in [ c o d e ] [ / c o d e ] tags (no spaces). It just looks better, and is somewhat convienant.
04-02-2004, 10:14 PM#6
Quetz
Quote:
Originally Posted by johnfn
I dont like big triggers (shiver) but your trigger looks pretty sound. My best idea would be to debug it using game- display message to character. You should just display various results when certain actions happen.

Thats the best help i can give... Have you already debugged? what happened? If your in the dark about debugging, i can help.

I hope this helps... I never like it when there's a trigger i cant figure out :///...


Edit: BTW, a better way to post code is in [ c o d e ] [ / c o d e ] tags (no spaces). It just looks better, and is somewhat convienant.

I'm in a gray zone about debug. Do you mean like have it display an in-game message each time an action is done?

Btw, I tried making a trigger that forced blue to push the arrow key repeatedly while he had it hold down. 'Twas a no-go.

And I've read the topic about memory leaking, and that sounds to be what the problem is.
04-03-2004, 01:23 AM#7
Cubasis
Yes, your problem is memory leaks. That firstly affects exiting times of maps. Each time you use "Position of Unit" or "Center Of Array", you should do one of the following, depending if you use UMSWE or not:

UMSWE:
Set MyPointVariable too (Position Of MyUnit)
*Whatever you wanna do with the Position of MyUnit*
Point - Destroy MyPointVariable

Else:
Set MyPointVariable too (Position Of MyUnit)
*same as above*
Custom Script: call RemoveLocation( udg_MyPointVariable )

Also, while you don't use Unit groups here, you should keep it in mind for later that whenever you work with Unit Groups (Pick each unit in (Units In MyRect) or whatever). you should do the above thing, but with UnitGroup variables and if you don't have UMSWE: "Custom Script: call DestroyGroup( udg_MyGroupVariable )"

Hope this helps.

Cubasis
04-03-2004, 01:31 AM#8
Quetz
Quote:
Originally Posted by Cubasis40
Yes, your problem is memory leaks. That firstly affects exiting times of maps. Each time you use "Position of Unit" or "Center Of Array", you should do one of the following, depending if you use UMSWE or not:

UMSWE:
Set MyPointVariable too (Position Of MyUnit)
*Whatever you wanna do with the Position of MyUnit*
Point - Destroy MyPointVariable

Else:
Set MyPointVariable too (Position Of MyUnit)
*same as above*
Custom Script: call RemoveLocation( udg_MyPointVariable )

Also, while you don't use Unit groups here, you should keep it in mind for later that whenever you work with Unit Groups (Pick each unit in (Units In MyRect) or whatever). you should do the above thing, but with UnitGroup variables and if you don't have UMSWE: "Custom Script: call DestroyGroup( udg_MyGroupVariable )"

Hope this helps.

Cubasis

How would that work with an array?

call RemoveLocation( udg_MyPointVariable[1] )

?

And I still need help figuring out why only reds unit responds properly to arrow movement.
04-03-2004, 02:15 AM#9
johnfn
Debugging is just checking peroidically to see if everything's working. You have in your code, for ex.:

If - Conditions
Up[(Player number of (Triggering player))] Equal to True
Then - Actions
Unit - Order Character[(Player number of (Triggering player))] to Move To ((Position of Character[(Player number of (Triggering player))]) offset by 75.00 towards ((Facing of Character[(Player number of (Triggering player))]) + 10.00) degrees)
Else - Actions
Unit - Make Character[(Player number of (Triggering player))] face ((Facing of Character[(Player number of (Triggering player))]) + 10.00) over 0.10 seconds

You could put a game- display to player 2 message for the then-actions and the else-actions, to see if it gets this far. Debugging is helpful so you can pinpoint the bug.

If that makes no sense (it probably doesnt, im tired :\ ) let me restate: You have the game just tell you how the triggers are doing and the value of your variables. When one variable gets messed up, you will know where the triggers are messed up.

I hope that helps...


ZZzzZZzzzzZzzZZzzZZZZzzZz...
04-03-2004, 02:17 AM#10
Quetz
Quote:
Originally Posted by johnfn
Debugging is just checking peroidically to see if everything's working. You have in your code, for ex.:

If - Conditions
Up[(Player number of (Triggering player))] Equal to True
Then - Actions
Unit - Order Character[(Player number of (Triggering player))] to Move To ((Position of Character[(Player number of (Triggering player))]) offset by 75.00 towards ((Facing of Character[(Player number of (Triggering player))]) + 10.00) degrees)
Else - Actions
Unit - Make Character[(Player number of (Triggering player))] face ((Facing of Character[(Player number of (Triggering player))]) + 10.00) over 0.10 seconds

You could put a game- display to player 2 message for the then-actions and the else-actions, to see if it gets this far. Debugging is helpful so you can pinpoint the bug.

If that makes no sense (it probably doesnt, im tired :\ ) let me restate: You have the game just tell you how the triggers are doing and the value of your variables. When one variable gets messed up, you will know where the triggers are messed up.

I hope that helps...


ZZzzZZzzzzZzzZZzzZZZZzzZz...

Understood. Ill just add that in really quick and test it while im testing my multiboard. If you can manage to stay awake for around five more minutes I'll let you know how it went.
04-03-2004, 02:26 AM#11
Quetz
The boolean variables are actually remaining true, the unit just isn't responding to them like he should. And my multiboard kinda sucks plus Im not sure how to best fit all the players in it properly, is there a tutorial or previous post I can fall back on?
04-03-2004, 02:59 AM#12
johnfn
Quote:
is there a tutorial or previous post I can fall back on?

http://www.wc3campaigns.com/showthre...board+tutorial
Interestingly i just started fooling around with multiboards. This looks like a good guide (or perhaps the only guide)


Since everything in your trigger seems to be working, Im forced to assume that something your doing isnt working for 2 players. The unit isnt responding... I'd search around a little, but since that isnt my area of expertise (actually i dont have one ;) ) i cant really help you there :\ .

I hope you get this thing to work...

And of course there is always the option of a single player campaign... but there must be some reason...

Im suprised you understood my last post...

Now i am going to sleep. g'night!
04-03-2004, 03:04 AM#13
Quetz
It was either clear enough or I'm just plain brilliant.

Now, for all of you who have come to tell me how not-brilliant I am, answer me this question:

Whats the trigger that you use to count the amount of times a trigger has been used?
04-03-2004, 03:31 AM#14
Quetz
Well, I figured out how to make my guy keep going, I had to make an individual trigger for each player, for each movement key. Ouch.

And I still need an answer, is :

call RemoveLocation( udg_MyPointVariable[1] )

The proper way to write the custom script when using variables?
04-03-2004, 12:39 PM#15
Cubasis
Yup, that's exactly how you do things with arrays. GJ

Cubasis