Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: HLD_Prophecy on August 25, 2016, 12:08:56 pm
-
Hey all!
So I'd like to know how to set up an event so that the player automatically jumps when he reaches a certain node. The subspace drive is disabled otherwise.
I'm thinking "is-in-box", but doesn't that have to be tied to a subsystem? (Does a jump node have a subsystem? :P)
I mean, I suppose I could be un-lazy and make an AWOL debrief, but that would really mess up the immersion. And I'd still have to set it up so that the player could only "succeed" and continue to the next mission by jumping at the node.
This mod has a pretty unusual story, so plot and immersion reasons keep me from using many typical structures.
-
Do you want to allow the player to choose to jump, but only when inside the node?
Put a waypoint at the center of the node
When player is less than, uh, 100 meters (or whatever) from the waypoint, allow warp. Give this event 9999999 repeats with interval 0.
When player is greater than 99 meters (or whatever) from the waypoint, break warp. Give this event 9999999 repeats with interval 0.
-
in mission submenu, you also have "force-jump" sexp that forces player ship to jump and end the mission (regardless of subsystem status, it will force the jump whatever the conditions are). It cannot be disengaged afterwards.
so you can do it like:
when
player distance <=100 ; waypoint
-force-jump
-
Or you just go with red-alert - if the campaign requires it.
-
Do you want to allow the player to choose to jump, but only when inside the node?
Put a waypoint at the center of the node
When player is less than, uh, 100 meters (or whatever) from the waypoint, allow warp. Give this event 9999999 repeats with interval 0.
When player is greater than 99 meters (or whatever) from the waypoint, break warp. Give this event 9999999 repeats with interval 0.
I'd like to do it this way. Thanks guys for your help!
Hey, crazy add-on question - is there any chance I could get the words "JUMP NOW" or something like that to fade in (as a subtitle, you know) whenever the player is in that <100 meters (or whatever) distance? And fade out if the player leaves it again?
-
show-subtitle-text or show-subtitle-image? Both seem to have fade in/out options. (disclaimer, I have not personally used these sexps!)
-
I guess like this?
(https://i.gyazo.com/e01aa8ef3410788773e69eea0b7061f2.png)
-
Whoa, thanks Hound! That's exactly what I wanted! Will set it up now.
-
Um, how do you get the text to stay there until/unless you leave the node again? As I have it, the text just fades out like normal.
-
You could increase the timer on the text SEXP, but thats the not so good workaround.
I am not sure, the thing that I've shown in the video is exactly what you have on the screenshot. Im not sure how long it lasts... ill check later for that.
-
Set the fadein time to 0 and the fadeout time to 1 second.
Make the event that puts the text on screen repeat every second. Have it fire only if the player is within jump range of the waypoint.
-
Set the fadein time to 0 and the fadeout time to 1 second.
Make the event that puts the text on screen repeat every second. Have it fire only if the player is within jump range of the waypoint.
That would be the way to do it I believe.
-
Set the fadein time to 0 and the fadeout time to 1 second.
Make the event that puts the text on screen repeat every second. Have it fire only if the player is within jump range of the waypoint.
So I can't have a fade in?
Sorry that I didn't respond for a while, I've been sick.
-
I can't figure out how to get it to repeat every second. And the fadein time and the fadeout time are controlled by a single number; they have to be the same.
I'm sorry, I'm just confused.
-
Use the repeat count to the right of the event list in the events editor.
-
Use the repeat count to the right of the event list in the events editor.
Okay thanks, I found it! Sorry for not looking harder.
And how do I put "once every second" in there? It's just a number - what does the number mean?
-
Repeat count and interval are separate boxes, and the latter is specified in seconds (with "0" meaning "every frame").
-
Okay... so I have Trigger Count for the show subtitle text event set to 0 so that it will there will be no delay between tests of the event - is this right?
Really I'm confused as to the difference between Repeat Count, Trigger Count, and Interval Time. Can someone explain this to me?
Alos Interval Time is grayed out for this event, for some reason. Not sure why I can't edit it, it's locked at 1.
Not sure if it makes any difference, but my show subtitle text event is separate from the allow-warp event. The show subtitle text event is reliant on the allow-warp event being true.
-
No.
Trigger count says 'how many times can this event fire, assuming its conditions are true?'
Interval time says 'after the event fires, how long should I wait until I check to see if I can fire again?'
Just forget repeat count for now.
If your trigger count is set to zero the event will never happen. You need to set the interval count to zero to check every frame.
Never use trigger count with a chained event, afaik it gets weird.
-
Never use trigger count with a chained event, afaik it gets weird.
All the big kids use Trigger Count, Repeat Count, and Chained Events for true chaos. :nod:
-
Never use trigger count with a chained event, afaik it gets weird.
Or just set "$Use Alternate Chaining Behavior:" (http://hard-light.net/wiki/index.php/Game_settings.tbl#.24Use_Alternate_Chaining_Behavior:) in your mod's game_settings.tbl.
-
Oh, I think I get it!
So now I've got my trigger count set to 9999, will go test...
EDIT: Great Colossi on a stick! It worked! I went in and it the text stayed there, went out and it went away, went in went out went in went out... sorry.
Thanks a whole bunch, everyone, for being really patient and helping me get this figured out! Now I can get on with FREDing without worrying about that problem. :)