Trigger Loop - CRASH

Shadowy Fear

I have returned
Reaction score
44
Hmm, for my as-of-now undisclosed WIP, I decided to create a third-person perspective, eye-level camera. As creating one for each of the ten players would be laggy and redundant, I decided to loop it all into one trigger. The trouble is, it crashes the whole game now. Can anyone explain why/fix the problem? :p
This is the variable setting trigger (only have player one - red set right now).
Code:
E:Time - Game Time Elapsed is 0.00 seconds
C: N/A
A: Set PlayerCameraTarget[1] = Paladin 0001 <gen>

This is the trigger that does the camera.
Code:
E: Time - Every 0.6 seconds of game
C: N/A
A:Camera - Pan camera for (Player((Integer A))) to (Position of PlayerCameraTarget[(Integer A)]) over 0.10 seconds
Camera - Set (Player((Integer A)))'s camera Distance to target to 450.00 over 0.10 seconds
Camera - Set (Player((Integer A)))'s camera Angle of attack to 80.00 over 0.10 seconds
Camera - Set (Player((Integer A)))'s camera Height Offset to (10.00 + (Current flying height of PlayerCameraTarget[(Integer A)])) over 0.10 seconds
Camera - Set (Player((Integer A)))'s camera Rotation to (Facing of PlayerCameraTarget[(Integer A)]) over 0.10 seconds
Any help would be appreciated :p :>) Or at least what I have done wrong here.

Oh, and I am going to change the paladin; each player will recieve a custom hero of mine (and a randomly picked one of those will have an extra, custom ability).
 
P

PwnThePanda

Guest
I think you have to change it to .01 or somthing greater then 0 for the variable trigger.
 

Cres

New Member
Reaction score
25
change time elapsed to 0.6 seconds i think, maybe im not very sure i remember reading something about not using 0.00 seconds elapsed (is that what you mean panda?)
 
P

PwnThePanda

Guest
Yeah, thats what I mean. Becuase wc crashes if it has like 7000 triggers at once. Like if you send a unit to a certain region but when they go to that region they go back to the other region so they keep on transporting back to each pther would make wc crash. Now if you have every 0 secounds, they would be basically less then .00000000000000000000000000000001 of a secound. It would do it to many times and cause it to crash. This is my Theory, notice its my THEORY. I have no clue if what I said is fact but I believe that is why its crashing.
 

Shadowy Fear

I have returned
Reaction score
44
Ok, thanks :>)

I'll go test it right now.

Lol, the variable - setting triger was only supposed to fire once :p Hmm ...

Wonder what would happen if I made it find the square root of pi LOL!
 

Cres

New Member
Reaction score
25
shadowy, just for the record, you cant pi is an imaginary number...(ish)
 

Shadowy Fear

I have returned
Reaction score
44
Lol, is it?

Grrr, still crashed >_<

Something like 'memory could not be accessed' on error acknowledgement popup.

Do I need to set the variables for all the other players (who aren't even included yet) so that the game can 'access' something?

Lolol, you will (hopefully) love my new WIP :p :>) It will be very ... spooky :p and the camera will play a critical role there.
 

SilverHawk

General Iroh - Dragon of the West
Reaction score
89
Shadowy Fear said:
Do I need to set the variables for all the other players (who aren't even included yet) so that the game can 'access' something?

Yes, or check the box "Automatically create unknown variables" in the Map Options menu.
 

XXXconanXXX

Cocktails anyone?
Reaction score
284
@SilverHawk: That's ONLY for copying / pasting triggers from one map to the other.

@SF: The crash ahs nothing to do with the initlization trigger, but the camera trigger. It's doing it over and over, and cmaera's tend to lag alot if your constantly doing it. So, every 0.06 seconds, it's setting it to a certain distance for 0.10 seconds, but then resets it. That's where the crash lies.
 

Cres

New Member
Reaction score
25
conan you r getting careless?
E: Time - Every 0.6 seconds of game
sry, I just needed to do that... bladestorm is really making me mad...
maybe the camera is kinda messed up though... try making it pan 0.01 seconds? just my idea...
 

Shadowy Fear

I have returned
Reaction score
44
Meh, that sort of defeats the entire purpose of MAKING an initilization trigger >_< Lol :p

I have it for 0.6 seconds, but I was hoping that by looping it into a trigger, I could reduce the lag.

Is there another way to do that without the lag? If I convert it to JASS as it is right now, will that help any? I'll change it to 0.01 or whatever instead.

This is just out of curiosity, but will converting ANY trigger to JASS make it run more efficiently? I mean just clicking on it and converting it to custom text, not rewriting it to be more efficient.

Hmm, do my [Interger A] things work ok? I am rather confused on variable array compatability ... :p
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> will converting ANY trigger to JASS make it run more efficiently?

Not in and by itself, since the game does that already anyway,
but you can work a bit on it.

For conditions, for example, I noticed a lot of things like:
IF not Function(Value) == true
THEN
return false
ENDIF
return true

Compare that with:
return Function(Value)

Guess which one runs faster?

Of course, the "win" is only ever some micro-seconds, or less.
But, if it's just running "often enough"...
 

XXXconanXXX

Cocktails anyone?
Reaction score
284
Well, if your waiting 0 seconds, then jsut set it to Map Initilization.

And another thing, I jsut looked at again, from skimming through it and I noticed you have things set to Integer A. Integer A and B are only used for loops, NOTHING else.
 

XXXconanXXX

Cocktails anyone?
Reaction score
284
Ok...Talked to you and figured out what you want...

Code:
Follow unit
    Events
        Time - Elapsed game time is 5.00 seconds [b]//Or whenever[/b]
    Conditions
    Actions
For each (Integer A) from 1 to 10, do (Actions)
    Loop - Actions
        Camera - Pan camera for (Player((Integer A))) to (Position of                   PlayerCameraTarget[(Integer A)]) over 0.10 seconds
        Camera - Set (Player((Integer A)))'s camera Distance to target to 450.00 over 0.10 seconds
        Camera - Set (Player((Integer A)))'s camera Angle of attack to 80.00 over 0.10 seconds
        Camera - Set (Player((Integer A)))'s camera Height Offset to (10.00 + (Current flying height of PlayerCameraTarget[(Integer A)])) over 0.10 seconds
        Camera - Set (Player((Integer A)))'s camera Rotation to (Facing of PlayerCameraTarget[(Integer A)]) over 0.10 seconds
        [b]Camera - Lock camera target for Player 1(Red) to (unit), offset by (0.00, 0.00) using Default rotation
        Camera - Lock camera target for Player 2(Blue) to (unit), offset by (0.00, 0.00) using Default rotation[/b]
[b]//Continue for all players / units[/b]
 

Shadowy Fear

I have returned
Reaction score
44
Already done :p I moved those into another variable setting trigger that runs after map initilization at .05 seconds (I will probably space out my init triggers over .5 seconds to reduce lag).

Grrr, for your testing, conan, something in Solta's blink lagged my system out so much I thought it had completly frozen. I naturally pressed ctrl alt delete to get out of it, but then that started ... copying itself over and over again every time I tried to close it, and I finally had to manually turn off my computer :/.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top