| 04-02-2004, 07:44 PM | #1 |
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 | |
Quote:
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 | |
Quote:
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 | |||||
Quote:
I have one of this trigger for each direction. Quote:
Same as above. Quote:
Same deal here, barring the obvious differences of each direction. Quote:
This is, obviously, what makes the other ones work. And now one of the camera triggers: Quote:
Let me know if I can do anything else if you need it. |
| 04-02-2004, 10:02 PM | #5 |
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 | |
Quote:
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 |
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 | |
Quote:
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 |
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 | |
Quote:
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 |
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 | |
Quote:
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 |
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 |
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 |
Yup, that's exactly how you do things with arrays. GJ Cubasis |
