|
stranger
|
OP
stranger
Joined: Jul 2014
|
I'm having issues where the story editor will not generate a global atmosphere trigger definition. I've rebooted the editor like 10 times and keep remaking atmosphere triggers, but I can't get the generate definitions to recognize atmospheric triggers. I've tried setting it to global or local.
I wanted to fiddle with the TriggerSetAtmosphere option and try to change the atmosphere based on events. So I'm using a query to get the trigger UUID, but no matter what I do, it seems the atmosphere triggers are not being detected, so I cannot query the UUID. I'm not sure if this is just buggy or if I am missing something. After reloading a few times and I click on the trigger itself, it causes a 'continue' or 'quit' error as well.
I know the call function requires an atmospheric trigger because when I substitute in a box trigger into the query function, I get an error upon causing the event, where it reports I have used an invalid atmospheric trigger UUID.
Anyone have any luck with this?
|
|
|
|
stranger
|
OP
stranger
Joined: Jul 2014
|
----UPDATE---- Ok so I had to take the night off after my nerd-rage from trying to deal with this. But this morning I tried again and the same results. So I just clicked the atmosphere trigger and looked at the sidebar. It is quite irritating that I cannot copy/paste the GUID, but I just typed it out myself into the TriggerSetAtmosphere call function and it worked.
So essentially I had it set up to be Undead atmosphere inside this Atm trigger. I walk into some random box trigger and it changed the atm trigger to be Fog. So the I got the functionality to work, for anyone who is like me and wants to be able to change the atmosphere from triggers.
With the following code I have simulated a day/night cycle, but I'm not quite sure how the timing works. It seems that the integer is 1ms, so that 1000 is 1 second. So for my following quick example, I have this infinite loop that changes the atmosphere for an atmosphere trigger every 10 seconds. Seems to be working just fine.
Init: TimerLaunch("atmTimerDay",10000);
KB: IF TimerFinished("atmTimerDay") THEN TriggerSetAtmosphere("19fda201-7858-43a0-b311-728ab1cc0891","Undead"); TimerLaunch("atmTimerNight",10000);
IF TimerFinished("atmTimerNight") THEN TriggerSetAtmosphere("19fda201-7858-43a0-b311-728ab1cc0891", "Dawn"); TimerLaunch("atmTimerDay",10000);
Now, the GUID is just copied from the sidebar of the trigger, and the "Undead" and "Dawn" can be any atmosphere you want. You can create your own, obviously.
It helps to add something like "PlayEffectAtCharacter("FX_Skills_Air_Storm_Impact_A",CHARACTER_Player1);" into the THEN statement so you can see if the trigger is actually going off. I originally set the integer to 10 and it was changing atmospheres so fast that it wasn't registering. But the lightning effect made my guy look like Raidin, so I was able to realize the problem. I stole this trick from roguelike's video, so I'll give credit where it's due.
However, if anyone can tell me how to get the story editor to recognize the global atmosphere trigger, it would be so much easier to just query the UUID instead of having to type it out. Or, at least tell me how I can copy/paste the GUID since it is error-prone and tedious to just retype it out. I was attempting to use this: TriggerGetUUID(TRIGGER_atmTest,_atm1) which spits out the UUID as a string variable I have labeled _atm1, which would be so much more convenient for scripting. However, as I mentioned, TRIGGER_atmTest is not being recognized.
Again, sorry if this is a newb question. I am quite new to modding.
Edit: One slight bug I notice is if I stand stationary inside the trigger, the atmosphere will not change. So you have to move in order to activate the atmospheric trigger. I suppose this isn't an issue if the day/night cycle is longer than 10 seconds because if you're standing around for 30 minutes straight, you probably aren't at the keyboard. Would be nice to fix this though for other atmospheric changes.
Last edited by Farmer Bob; 30/07/14 06:43 PM.
|
|
|
|
addict
|
addict
Joined: Jul 2014
|
For copying the GUID, in the Template/Trigger/etc viewer on the left side of the screen, right click the entry you want to copy and press "Copy GUID".
|
|
|
|
stranger
|
OP
stranger
Joined: Jul 2014
|
Thank you Rhidian. Also curious how to define variables before using them. So in my example above I'd like to do something like: int timer1 = 10000 so I don't have to retype the explicit integer every time in my code. I'm really not familiar with the syntax of the story editor, so I don't know how to do this. 
|
|
|
|
apprentice
|
apprentice
Joined: Jul 2014
|
I think you might be able to use a PROC for that. Dig through the _PROC.txt goal and see how Larian was able to define custom and specific calls
|
|
|
|
stranger
|
OP
stranger
Joined: Jul 2014
|
Docalypse, it's not the query that's having the error, it's not being able to detect my atmosphere trigger. I can sub in a box trigger and it compiles fine. But then when I am in game, I get the error about it not being an atmosphere trigger. So my issue is when I click Generate definitions, the editor does not detect my atmosphere trigger. I don't know what else to do. I made it global.
The query works fine as long as it is before the THEN statement. So I just do IF xxx AND queryfunction, and it works fine.
|
|
|
|
apprentice
|
apprentice
Joined: Jul 2014
|
im looking voer one of my previous levels at my atmosphere triggers, I have one 2 atmosphere triggers, both are not set to global. in the trigger type: atmosphere section of the SideBox, I have the atmosphere named, and no GUID. also I dont think it makes much of a difference, but i also set my physics type to polygon for my atm-triggers and bumped their height waaaaaay up (100) I hope this is what you mean, my previous comment was addressing what I thought you were looking for more function over your day/night cycle script (which I think is cool)
|
|
|
|
stranger
|
OP
stranger
Joined: Jul 2014
|
So what I mean is that if you go into story editor and you generate definitions, and you begin to type a trigger, the editor does not recognize the atmospheric trigger existing.
I can set up the atmospheric trigger just fine. It look just like yours. I use polygon physics and raise the height to something like 30. I have tried global True and False and it still will not show it in the story editor.
For example, if you use the story editor to teleport a character to a trigger. You make the point trigger global and generate definitions. Immediately the editor will recognize and auto-fill the trigger if you begin to type it.
What I want to do is be able to access it in the story editor. Perhaps atmospheric triggers cannot be accessed this way. In any event, just using "Get GUID" by right clicking the trigger in the trigger menu works fine. I just think it would be more elegant to have the script query the GUID so I can keep track of which atmospheric trigger is which without comparing GUIDs to the trigger. Perhaps this is why the setatmosphere call function requires a GUID and not just the name of the trigger of the form TRIGGER_atmTrigger, or whatever.
|
|
|
|
apprentice
|
apprentice
Joined: Jul 2014
|
I see what you're saying, and yeah that would be pretty damn annoying. it could very well be a bug or the engine isn't suited for that function (yet). I recall Larian wanting to implement a day/night cycle, maybe that had something to do with why it was scrapped (for now)
|
|
|
|
old hand
|
old hand
Joined: Dec 2013
|
Yes, atmosphere triggers are different animals and not treated as ordinary triggers.
I have simulated a day/night cycle and my script works similarly to yours. There is one "gotcha", however. Currently, if you are standing idly in the trigger when the timer goes off and you change the atmosphere, it will not start changing until the player moves and triggers the trigger. It would be a nice change if Larian were to give us an API for kicking the atmosphere trigger. As it stands now, I have a workaround hack wherein after changing the atmosphere of the trigger, I get the current position of the player. If the player is still in the same position after a few seconds, I nudge the player by 0.1. Not sure if it will work if the player is in a conversation, and I know it doesn't work if the player is lying in a bed. So there are a number of little quirks right now that will make this a real hassle.
|
|
|
Moderated by Bvs, ForkTong, gbnf, Issh, Kurnster, Larian_QA, LarSeb, Lar_q, Lynn, Monodon, Raze, Stephen_Larian
|
|