would someoen plz teach me how to script for my level


(Lock Ness Monster) #1

IF read alot of tutorials about scripting and i cant make head or tails of that stuff, i was wondernig if anyone would teach me how, like on an IM or something, plz, someone teach me


(Ifurita) #2

not me. My suggestion would be 1) read my scripting tutorial, then 2) start with something simple, like a destructible and work you way through it, posting questions here as necessary. Anything over IM would simply end up being an inefficient way of writing your script for you.


(Lock Ness Monster) #3

not fully, ive had someone teach me somethings i didnt know about on the map now, and i need someoen to tell em what it all means and how to do the basic stuff, i dont understand one thing about scripting not one, but i want to make my level bymyself so i dont want anyone to script for me, if anyone else would want to teach me let me know plz.


(Ifurita) #4

so what scripting have you actually tried and what happened? What didn’t work and what did work? Did you get any error messages?


(Lock Ness Monster) #5

i dont even know where to begin, i read ur tutorial and i get lost at the consrtucting door part, i dont know anything, where to put the script or how to start or anything, i just need someone to tell em how to start and what means what, lets just say i put a command post in for the allies and the finished and not finished was put together


(Ifurita) #6

Command post is complicated. Start out with something simple like a destructible wall. Try out map-in-a-box

http://planetwolfenstein.com/4newbies/mapinabox-ver3.zip


(Mapper X) #7

Download the Temple.script at Marko’s website and copy the parts you need for your map lol

Marko’s website =>

www.swat-clan.com/marko

Or take a look at the goldrush.script.

:clap:


(The Wanderer) #8

Nobody’s going to teach you how to script. The sooner you stop acting like a cry baby, and start reading and paying attention to what you’re reading the sooner you’re going to learn. How do you think the rest of us figured these things out. We didn’t have anyone teach it to us. You got to read and try and fail and read again and try again and fail again and if you keep working you’ll figure it out. If you open a tutorial and you read the first sentence and your only thought is “i can’t make heads or tails of this” then i can assure you’ll never learn anything. Geeez…


(Loffy) #9

Hi!
My suggestion is to make a test-map. A simple box with red and blue spawns. Here is one:
http://www.planetquake.com/simland/ldr1_1/samplemap01a.htm
Then add simple scripting stuff. Too see how it works. Why not start with adding a cube and make it a script_mover, targetname “cube”, scriptname “cube”?Then in the script, just add:

cube // The name if the entity.
{
wait 50 // A wait period of 50.
setrotation 200 200 100 // setrotation <pitchspeed> <yawspeed> <rollspeed>
}

That was the command setrotation. There are many more. Some of them are listed here:
http://www.planetquake.com/simland/ldr1_1/appendix_a.htm

Keep on tryng! And don’t start with the complicated stuff inititally - start with the simple thing just to get the hang of it.
//Loffy


(Lock Ness Monster) #10

ive hust followed a good scripting to tutorial and i think i learned alot, but im still lost about one thing, what all does it mean in the actually script u make, ive tried so hard to understand the tutorials and i got everything but that now, and i copied a script from the thing just to test it and i got an error saying something abotu the script_mover needed a model or soemthing, but i thought i did that, im so confused with this


(Ifurita) #11

FWIW, it’s really hard to guess at what problems you’re having since you kind of throw out a lot of generalities without any actual scripts you’ve written, entity keys, and a description of what does and does not happen. You’ve made tons of posts and I still have no idea what problems you’re having other than “it’s beyond you”


(Lock Ness Monster) #12

everything is wrong, i dont get any of it, i got the things abou twhat u set objects to, but when it comes to the text where u got to type all that in, i dont understand any of it


(nUllSkillZ) #13

Do you mean where to type in the script text?
You can use any editor.
If you have Windows as OS just use notepad.
Then open a new file.
Then you can start to type in the script.
After you have finished the script just save the file as “mapname.script” in the “etmain/maps” directory.
Use the “” when saving the file because notepad will save it as mapname.script.txt otherwiese.
mapname represents the name of your map-file.


(Lock Ness Monster) #14

ill try that, but also i dont understand the typing part at all, i dont know what all that means


(Ifurita) #15

Maybe I’m just really off track, but WTF do you mean about the ‘typing’ part of it? Clearly I am of no use here. I’m out


(Lock Ness Monster) #16

im talking about the actual script, in the text document that goes with ur level, thats the only part of scriptting i dont get


(Ifurita) #17

well, I’m sure someone will be along who understands what you want and can help.


(nUllSkillZ) #18

Do you mean the script at all?
Every part or block of the script is started with “{” and closed by “}”.
Comments start with “//” and are ignored.
There’s a general part called “game_manager” where the game rules are set.


game_manager
{
	// ...
}

And for every entity that has some functionallity there’s another entity script block.
These blocks start with the scriptname of the entity.


ENTITY_SCRIPTNAME
{
	// ...
}

Within these entity-scriptblocks there are event-scriptblocks.
They start with the name of the event.
“spawn” and “death” are some of them.
So for example for a “func_explosive”-entity you have the following scriptblock:


FUNC_EXPLOSIVE_ENTITY_SCRIPTNAME
{
	spawn
	{
		// ...
	}
	death
	{
		// ...
	}
}

You can create your own events using the following syntax:


FUNC_EXPLOSIVE_ENTITY_SCRIPTNAME
{
	spawn
	{
		// ...
	}

	trigger MYEVENT
	{
		// ...
	}

	death
	{
		// ...
	}
}

Within the event-scriptblocks there are the actions that take place if an event is triggered.
“wait” and “wm_announce” are examples.


FUNC_EXPLOSIVE_ENTITY_SCRIPTNAME
{
	spawn
	{
		wait 200
		wm_announce "The FUNC_EXPLOSIVE has been spawned!"
	}

	trigger MYEVENT
	{
		// ...
	}

	death
	{
		wm_announce "The FUNC_EXPLOSIVE has been killed!"
	}
}

If you want to call a specific event if another event occurs you have to use the following action:


ENTITY_SCRIPTNAME
{
	spawn
	{
		// ...
	}

	trigger MYEVENT
	{
		// ...
	}

	death
	{
		trigger ENTITY_SCRIPTBLOCK EVENT_SCRIPTBLOCK
		wm_announce "The FUNC_EXPLOSIVE has been killed!"
	}
}

if the func_explosive dies a specific event (and with it all actions defined in this event) of an entity is called.
If the EVENT_SCRIPTBLOCK is within the same ENTITY_SCRIPTBLOCK then you can use “self” instead.
For example if you call the event “MYEVENT”:


ENTITY_SCRIPTNAME
{
	spawn
	{
		// ...
	}

	trigger MYEVENT
	{
		// ...
	}

	death
	{
		trigger self MYEVENT
		wm_announce "The FUNC_EXPLOSIVE has been killed!"
	}
}

Unfortunately there is no script language reference.
But I’ve looked at the source of ET.
You can find an overview of what I’ve found here:
http://www.level-designer.de/index.php?option=com_forum&Itemid=48&page=viewtopic&t=1104&highlight=referenz&start=12

Some germen text at the begining.


(Ifurita) #19

LOL, I think you should explain this to him via IM


(Lock Ness Monster) #20

that is exactly want i was talking about, thanks a bunch, ok, so if u wanted to lets say make an elevator go up and down, what all would u have to put in the script, i followed this tutorial to make a moving object

http://www.nibsworld.com/rtcw/

i went to the moving an object part and i have followed everything, i just need the script to make my object want to move along the path i made.

also about the func_explosive object scripts, is that it, or do u got to add some to it, like the targetname and stuff?