Page 2 of 4

Posted: Mon Jan 19, 2004 12:23 am
by Bjarne BZR
ambient sound for V2:

Code: Select all

exec global/ambient.scr obj_team2

Posted: Mon Jan 19, 2004 2:22 am
by GrimReaper
Wow,dude you are right on top of things.Lol.But once again another question I had no idea how to try to search for this one but...I was woundering why I have light shining through walls towards the bottom of the wall.Like say you have two rooms with a wall inbetween.and your in one room and you have no lights in the room you are in, but lights in the other and I can see the light towards the bottom of the wall that is?

Posted: Mon Jan 19, 2004 7:07 am
by jv_map
GrimReaper wrote:Wow,dude you are right on top of things.Lol.But once again another question I had no idea how to try to search for this one but...I was woundering why I have light shining through walls towards the bottom of the wall.Like say you have two rooms with a wall inbetween.and your in one room and you have no lights in the room you are in, but lights in the other and I can see the light towards the bottom of the wall that is?
Do a search for 'light leaking' :idea:

Posted: Mon Jan 19, 2004 7:19 am
by wacko
make the floor of each room a separate brush and let the wall brush stick into the floor, i.e. the wall brush's bottom face is deeper than the floor brush's top face. this should stop the light

Code: Select all

bad:                 
    | |wall brush
    |_|     
______________
______________| floor brush

Code: Select all

good:                 
    | |wall brush
    | |     
____| |_______
____|_|_______| floor brush

Posted: Mon May 02, 2005 8:26 am
by k47a
I got a problem with stealing documents: I followed Manstein's tutorial on how to add a stealing papers obj to a SP map.
I did all the mapping part and now I'm trying out the scripting stuff. I got the compass working (and also have the order to steal the documents (tab)) but when I reach them, I just can't take them...
I have problems with scriptin anyway, as I never know when and where to put an 'end'.
I don't know whether something's wrong with the trigger in the map (I used trigger_multiple, as said in the tut - btw, the trigger's bigger than the docs). Or there might be a bug in the script... :?

Posted: Mon May 02, 2005 9:07 am
by Bjarne BZR
Easier to say what is wrong if you post the script. And also a trace of the consol messages whern you run the map.

Posted: Mon May 02, 2005 9:16 am
by k47a
Bjarne BZR wrote:a trace of the consol messages whern you run the map.
:? What's that? Is that the window that opens when compiling or the one you see when you play a game?

Anyway, I'm gonna post the script as soon as I'm home...

Posted: Mon May 02, 2005 10:08 am
by Bjarne BZR
Its the text you get in the consol ( Activated with the button under the ESC button if you have the console activated in your settings ). Write logfile 2 in the consol before loading the map and you should get all consol messaged written to the file qconsol.log in <MOHAA>/main directory.

Posted: Mon May 02, 2005 12:28 pm
by Green Beret
That logfile doesnt work for me fer some reason.
And the notepad command(editscript) or somthing like that.

I type that stuff in console, I get no log in main nor does the notepad kick up.

Posted: Mon May 02, 2005 12:34 pm
by Bjarne BZR
Try setting set developer 1 and/or running the map in developer mode: http://gronnevik.se/rjukan/index.php?n= ... Developing

Posted: Mon May 02, 2005 1:35 pm
by k47a
Bjarne BZR wrote:Its the text you get in the consol ( Activated with the button under the ESC button if you have the console activated in your settings ). Write logfile 2 in the consol before loading the map and you should get all consol messaged written to the file qconsol.log in <MOHAA>/main directory.
Hmm... When I compile the map it get's directly into the game, so how can I write anything in the console? Should I open the game normally (where you get that main room or whatever it is) and then type logfile 2 in and start my custom map?

Posted: Mon May 02, 2005 2:06 pm
by Bjarne BZR
IvaN (master of disaster) wrote:Hmm... When I compile the map it get's directly into the game, so how can I write anything in the console? Should I open the game normally (where you get that main room or whatever it is) and then type logfile 2 in and start my custom map?
Yes, open it normally.

Posted: Mon May 02, 2005 8:42 pm
by k47a
Alright, here's my script:
// ARCHITECTURE: IvaN (master of disaster)
// SCRITPING: IvaN (master of disaster)


exec global/ai.scr

///////////////////
level waittill prespawn
///////////////////


$enemyspawn ai_on

//////////////////
level waittill spawn
//////////////////


//**stealing documents**
waitthread global/objectives.scr::add_objectives 1 2 "Steal the documents." $documents.origin //compass!

waitthread global/objectives.scr::current_objectives 1


//**disable truck**
$cut_wire hide


thread global/ai.scr::spawngroup #1 #1


//**player weapons**
$player item weapons/colt45.tik
$player item weapons/m1_garand.tik
$player item weapons/mp40.tik



//**give him some ammo!**
$player ammo pistol 32
$player ammo smg 100
$player ammo rifle 60

end


main:


//disable truck
lorry_disable:
$normal_wire remove
$lorry_engine playsound m1l2b_disabletruck
$cut_wire show
iprintlnbold_noloc "The lorry has been disabled!"
end

//**steal documents**
objective1:
$documents remove //documents disappear after player's reached them
end
Besides, I never know when I have to put an 'end' and when I shouldn't...
:?

PS: Yep, I know, it's quite a mess... :D

Posted: Mon May 02, 2005 8:50 pm
by Green Beret
IvaN (master of disaster) wrote:Alright, here's my script:
// ARCHITECTURE: IvaN (master of disaster)
// SCRITPING: IvaN (master of disaster)

main:
exec global/ai.scr

///////////////////
level waittill prespawn
///////////////////


$enemyspawn ai_on

//////////////////
level waittill spawn
//////////////////


//**stealing documents**
waitthread global/objectives.scr::add_objectives 1 2 "Steal the documents." $documents.origin //compass!

waitthread global/objectives.scr::current_objectives 1


//**disable truck**
$cut_wire hide


thread global/ai.scr::spawngroup #1 #1


//**player weapons**
$player item weapons/colt45.tik
$player item weapons/m1_garand.tik
$player item weapons/mp40.tik



//**give him some ammo!**
$player ammo pistol 32
$player ammo smg 100
$player ammo rifle 60

end

//main://dont need this here, goes up top


//disable truck
lorry_disable:
$normal_wire remove
$lorry_engine playsound m1l2b_disabletruck
$cut_wire show
iprintlnbold_noloc "The lorry has been disabled!"
end

//**steal documents**
objective1:
$documents waittill trigger//maybe add this
$documents remove//documents disappear after player's reached them
end//do you have a trigger with a setthread of objective1?

Posted: Mon May 02, 2005 8:53 pm
by lizardkid
*sigh* ok ok, this needs some work.. but not too much.

Code: Select all

thread global/ai.scr::spawngroup #1 #1
unless this was just a test of spawners, you might as well just leave them in your map and skip this line.

Code: Select all

$enemyspawn ai_on 
this line too, unless you're just testing, you shouldnt need this. AI is always on at spawn.

Code: Select all

// ARCHITECTURE: IvaN (master of disaster) 
// SCRITPING: IvaN (master of disaster) 

main:

exec global/ai.scr 

/////////////////// 
level waittill prespawn 
/////////////////// 


$enemyspawn ai_on 

////////////////// 
level waittill spawn 
////////////////// 
 
thread prep
thread objs

end 

prep:
// hides stuff, gives stuff, anything that should happen first happens here..


$cut_wire hide 

$player item weapons/colt45.tik 
$player item weapons/m1_garand.tik 
$player item weapons/mp40.tik 

$player ammo pistol 32 
$player ammo smg 100 
$player ammo rifle 60 

print "Given ammo"

end

objs:
// handles the objectives for the mission.

waitthread global/objectives.scr::add_objectives 1 2 "Steal the documents." $documents.origin //compass! 
waitthread global/objectives.scr::current_objectives 1

end

lorry_disable: 

$normal_wire remove 
$lorry_engine playsound m1l2b_disabletruck 
$cut_wire show 
iprintlnbold_noloc "The lorry has been disabled!" 

end 


objective1:
// remove the docs
// should have a  trigger_use with a setthread to this thread.
// i dont remember the command, but you also need to clear that object and set a new one after this 
 
$documents remove //documents disappear after player's reached them 

end