Just a n00b question
Moderator: Moderators
-
Runt
- First Lieutenant
- Posts: 188
- Joined: Wed Feb 11, 2004 5:03 pm
- Location: The Netherlands
- Contact:
Just a n00b question
Why are those "{" and "}" Needed in scripts ?
They are containers.
Say you have an if statement:
Put code in them following something like that, this way the engine knows what code goes with it.
I'm not sure if the Q3 engine works like this or not, but if you have one line of code with it you can do:
Somethings that works on, others it doesn't. The script is based on C++, and that works in C++, but I'm not 100% sure if it works in MOHAA script.
Say you have an if statement:
Code: Select all
if(level.somevar==1)
{
//do this
//then that
//and finally this
}I'm not sure if the Q3 engine works like this or not, but if you have one line of code with it you can do:
Code: Select all
if(level.somevar==1)
//dothis
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
when you call an exec or thread statement from anotehr script off from the one you're writing, like so
exec global/ai.scr
sometimes you need to only cal a specific thread. so to spawn something the easy way...
thread global/ai.scr::spawnset 1
1 2 3
1. the command, only calls oen thread.
2. the path for the script. global is the generic path.
3. the thread in the ai.scr to call.

exec global/ai.scr
sometimes you need to only cal a specific thread. so to spawn something the easy way...
thread global/ai.scr::spawnset 1
1 2 3
1. the command, only calls oen thread.
2. the path for the script. global is the generic path.
3. the thread in the ai.scr to call.
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006

