Big scripting question

Argonnot

Still Mildly Glowing
Im trying to make scripts, but there being few resources for instruction, after a month of work on a few extensive maps, I need some help with the scripting.

1.) How would I make it so a computer will open a set of doors when used. Also, how do I make the doors auto close after the character and all npc's pass them (im assuming i need a proximity script for this.

2.) The whole headers thing, is quite confusing to me, so I need a rundown for that (Scripting walkthrough didnt help me much for this)

3.) How do I add locations to the world map, but have the remain hidden unless character is told where it is (like sierra army depot)

4.) conversations, like display picture and barter modifiers.

5.) Adding npcs that wander about in a certain area, npcs that have floating text, and npcs that are effected by procimity scripts.

That is my pit of confusion, but i would really like to know if there is an easier program to use for scripting FSE?
 
1) yes it's called "spatial script", i'd only make one spatial script (and it didn't realy work as i want) so i'm not sure i can help you about thid point, but i can tell you how to place it. in the mapper go to in the menu/tools/place spatial script.
i think you should use an existing script and active a gvar or mvar when the hero walk on the zone, and in the door script (in the critter_p_proc i guess, but this procedure isn't defined by default) put an instruction closing the door when this variable is activated.

2)sorry but i don't understand the question

3) Coljack's tutorials

4) start_gdialog(NAME,self_obj,4,TALKINGHEAD,BACKGROUNDPICTURE);

gdialog_set_barter_mod ( mod (int))

Sets the current modifier for barter to a given percentage (mod). Used to make barter easier/harder, even if the player initiates barter (as opposed to the script starting it.)

look in the mapper/scripts/docs directory it contains two helpfull files

5)look into the scripts like those of the junkies in the den

oh yes i know a very simple program for scripting : Notepad, but i'm not sure it's easier than fse.
 
1. look at other scripts for examples and try to work it out from there.. it's the best way to learn.. as the saying goes.. give a man a fish and he'll eat for a day, TEACH a man to fish and he'll eat for a lifetime..

2. headers are just easy ways to use the same thing over and over again without having to type it all again or cut and paste it..
for example the term
Code:
#define   dude_wearing_power_armor
saves you having to type
Code:
((obj_pid(critter_inven_obj(dude_obj,INVEN_TYPE_WORN)) == PID_POWERED_ARMOR) or \
(obj_pid(critter_inven_obj(dude_obj,INVEN_TYPE_WORN)) == PID_ADVANCED_POWER_ARMOR) or \
(obj_pid(critter_inven_obj(dude_obj,INVEN_TYPE_WORN)) == PID_ADVANCED_POWER_ARMOR_MK2) or \
(obj_pid(critter_inven_obj(dude_obj,INVEN_TYPE_WORN)) == PID_HARDENED_POWER_ARMOR))
every time...

3. thanks for the plug, but what he wants is a little more complex than i cover in my tutorial..
the tutorial covers adding the town to the worldmap, but not how to have it uncovered by a conversation as this requires a script..

put the map into the maps.txt and city.txt as described in the tutorial, but set the startstate in city.txt to off.. this stops it showing on the map..
make a note of the area number the "town" is in the city.txt list, you'll need this for the script..

next make the script that you want the town to be revealed in, and add the following lines after the reveal...
Code:
if (town_known(your_town_number) == MARK_STATE_UNKNOWN) then begin
      debug_msg("  mark_on_map("+your_town_number+")");
      mark_area_known(MARK_TYPE_TOWN, your_town_number, MARK_STATE_KNOWN);
      end
replacing "your_town_number" with the area number from the city.txt file..

4 & 5, what he said.. :)
 
thanks for the help, but im still suffering retardation when it comes to scripting (all I've managed to get working are auto cannons, which is more of a hindrance)
 
ok some pointers then.. try the vault 13 entrance for the scripts that work the door, the entry computer and the map itself ( since the variable used by the other scripts is set up in the map script... )


as for the closing when all critters have passed, try looking at a door that already auto closes for info on how to do it.. ( hint it's not done with a spatial, just the door script.. )
 
Back
Top