Ritualistic Forums

Go Back   Ritualistic Forums > Ritual Entertainment Games > Star Trek Elite Force II > EF2 Editing Forum

Reply
 
Thread Tools Display Modes
Old 06-18-2004, 08:02 PM   #1
Darheel
Rookie
 
Join Date: May 2004
Posts: 12
Default Scripting Advice

Hello. DK has helped me a lot in this matter, but we are stumped as to a few things that I would love to be answered, scripting is quite tricky.

First of all, I used the code from first steps scripting file, and everything from the file works fine, but when I tried to add some code of my own, to make the npc say something or become invincible for instance, it just didnt work. Have a look at my file:

void main()

{

wait(2);

$darheel.ai_off();

$darheel.walkto("$nav1");

waitfor($darheel);

$darheel.animateonce( "cin-m3_bail" );

$darheel.playsound( "sound/vehicles/shuttlecraft/shuttle_interior_loop2.wav ", 3 ,1 ,10000 );

}

I have taken out the things that dont work. This is what I want to work:

void main()

{

wait(2);

$darheel.ai_off();

$darheel.walkto("$nav1");

waitfor($darheel);

$darheel.animateonce( "cin-m3_bail" );

$darheel.playsound( "sound/vehicles/shuttlecraft/shuttle_interior_loop2.wav ", 3 ,1 ,10000 );

>>-->$darheel.say something in chat

>>-->$darheel.become invincible for game reasons

>>-->$darheel.do several other things that I cant remember now

}

Except for the third one, can someone give me some direct code that will work, and not do nothing, and if possible, teach me how to create it myself?

Thanks in advance guys, I would never have got this far without you.
Darheel is offline   Reply With Quote
Old 06-18-2004, 11:07 PM   #2
Tempest
Fanatic
 
Tempest's Avatar
 
Join Date: Aug 2003
Location: A rift in space and time running through Cardiff
Posts: 1,829
Send a message via MSN to Tempest
Default Re: Scripting Advice

>>-->$darheel.become invincible for game reasons code would be &darheel.immortal(1); 0 to turn it back.
$darheel.playsound( "sound/vehicles/shuttlecraft/shuttle_interior_loop2.wav ", 3 ,1 ,10000 ); -> This will make the specified sound play from any entity, but not make the player/npc say it. You need the dialog scripting.

For the chat, if you have the correct dialiag (vlp files) the text will appear on screen. Failing that centerprint ( "my text here" ); will make text appear in the centre of the screen. wheras print ("my text here"); will print it to the chat area (and possible the centre of the screen).
Tempest is offline   Reply With Quote
Old 06-19-2004, 12:05 AM   #3
Darheel
Rookie
 
Join Date: May 2004
Posts: 12
Default Re: Scripting Advice

I didnt quite get that last part, but im testing what I got, thanks, ill get back to you on how it worked.
Darheel is offline   Reply With Quote
Old 06-19-2004, 12:44 AM   #4
Darheel
Rookie
 
Join Date: May 2004
Posts: 12
Default Re: Scripting Advice

The Immortalness worked, thank you. But I dont quite get what you are saying about him chatting. I tried:

$darheel.print( "Hello." )

and nothing happened

can you elaborate a bit?

Also, I dont want him pushed around, how do I make him unpushable?
Darheel is offline   Reply With Quote
Old 06-19-2004, 09:50 AM   #5
Tempest
Fanatic
 
Tempest's Avatar
 
Join Date: Aug 2003
Location: A rift in space and time running through Cardiff
Posts: 1,829
Send a message via MSN to Tempest
Default Re: Scripting Advice

ah no, the print is independant of an entity.

Quote:
print ( "Welcome To Jump Station Alpha" );
Would do the trick, also

Quote:
centerprint ( "Welcome To Jump Station Alpha" );
and the pushable stuff.

$darheel.pushable(0); stops him and 1 to allow him.

Tempest is offline   Reply With Quote
Old 06-19-2004, 11:40 PM   #6
Darheel
Rookie
 
Join Date: May 2004
Posts: 12
Default Re: Scripting Advice

I hate to continue bothering you, but it didnt work. Nothig happened. He went through all the gestures, but no text showed up, and I copied your code directly. The script file looks like:

void main()

{

$darheel.immortal(1);

wait(2);

$darheel.ai_off();

$darheel.walkto("$nav1");

waitfor($darheel);

$darheel.animateonce( "conv-wavehello" );

print ( "Jolan Tru." );

wait(2);

$darheel.animateonce( "conv-talk1" );

print ( "I am Darheel." );

}
Darheel is offline   Reply With Quote
Old 06-21-2004, 06:33 PM   #7
BrushBaron
Level Designer
 
Join Date: Sep 2000
Location: Texas
Posts: 1,457
Default Re: Scripting Advice

"print" prints to the console to print to the screen you can use centerprint instead.
BrushBaron is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:12 PM.


Powered by vBulletin® Version 3.6.3
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.