Page 1 of 1

Adding a start up script at the start of a new game?

Posted: December 30th, 2013, 11:07 pm
by Ghostman Gaming
Hi,
Im currently working on a RPG game and was wondering
if it is possiable to have it so when the player starts a new game after the first map loads up for a diolog box to show up telling the player the basic controlls and the mission objective? the only example i can think of is on the FPS map experimental chambers.
:idea:

Re: Adding a start up script at the start of a new game?

Posted: January 1st, 2014, 8:19 pm
by Ghostman Gaming
Hi,
I wrote an example script of what I have in mind to show up when the player starts a new game.

Code: Select all

//new game
r_script_signal interact [
	r_chat self (? (& (r_global_get $beginning_quest 1)
]

r_script_node "main" [result "[Welcome to the Mangino's video game. lets get the basics out of the way do you want to learn the controls?] [
	r_response "[Yes]" "con"
	r_response "[No]" "acon"
]

r_script_node "con" [result "[Here are the basic controls use ARROW KEYS or ASDW to move your character. Press SPACEBAR to jump. Use your mouse or touch pad to look around. Use the left and right mouse buttons to attack and zoom. Press the TAB key to access your phone. Use E to interact.] [
	r_response "[Continue]" "acon"
]

r_script_node "acon" [result "[Welcome to the your bedroom Mike Mangino I hate to rush you but your late for school get downstairs and into your car fast NOTE: use E to enter cars and doors]"[
	r_reaponse "[Continue]" ""
	r_global_set $beginning_quest 1
	r_journal_record "Get to school" "You don't want to be late for your big test today!"
]
-Tyler Mangino

Re: Adding a start up script at the start of a new game?

Posted: January 2nd, 2014, 5:24 am
by Hirato
experimental chambers has a trigger-once trigger where the player spawns.

I can think of two ways to do this in the RPG.
1. use r_sleep to load up the dialogue - use a global variable check.
2. put it in the mapscript for the first map, under the the "load" signal - this signal is only executed when the map is loaded for the first time.