Help witih a little script

Post » Fri May 27, 2011 1:44 am

(Sorry, wrong subforum. Can a moderator move this to the CS subforum?)


In CharGen, as soon as I come out of that door right there from the slave ship, I want that guard to say a line of dialogue like "well well, look at you" or something. I want it to appear as a message box, not a dialogue box. And I want to have a couple options to either ignore him or slap him or something.

http://img706.imageshack.us/img706/9169/34162832.jpg


So I tried this and his dialogue box just kept popping up over and over and over and over and over continuously.


Begin ICMQ_TouchyGuardshort statefloat timerif ( MenuMode == 1 )	returnendifif ( OnActivate >= 1 )	returnendifif ( state == 0 )	if ( GetDistance Player < 130 )		Forcegreeting	endifendifif ( state == 1 );Initiated in Dialogue box	MessageBox "Well well, look at you." "Just keep walking.", "Slap him."endifendifif ( CharGenState == -1 )	disable"ICMQ_ship guard 05"->disableendifendifEnd



I don't know crap about scripting. But I want it to say something like: You feel the guard push you on the shoulder. "Well well, look at you."
And then I want to have a couple options to click as to what your response will be. I'm getting these ideas from the Immersive Chargen mod.
This shouldn't be too hard for you scripting gurus. lol
User avatar
lexy
 
Posts: 3439
Joined: Tue Jul 11, 2006 6:37 pm

Post » Fri May 27, 2011 8:19 am

why is this 'forcegreeting' still in the script? I thought, you don't want to have the dialogue box opened.
that would be my suggestion:

Begin ICMQ_TouchyGuardshort statefloat timershort buttonif ( MenuMode == 1 )	returnendifif ( OnActivate >= 1 )	returnendifif ( state == 0 )	if ( GetDistance Player < 130 )		set state to 1		MessageBox "Well well, look at you." "Just keep walking.", "Slap him."	endifendifif ( state == 1 )	set button to GetButtonPressed	if ( button == 0 )	set state to -1   ;do dis'ndat	elseif ( button == 1 )	set state to -1   ;push guard overboard and drown him with your bare hands	endifendifendifif ( CharGenState == -1 )	disable"ICMQ_ship guard 05"->disableendifendifEnd

User avatar
Laura Richards
 
Posts: 3468
Joined: Mon Aug 28, 2006 4:42 am

Post » Fri May 27, 2011 1:37 pm

I don't know. I'm just copying what the author had in Immersive Chargen.
Cool, it worked! Thanks.

I actually now just want to have it say one line of text, without any buttons to press. So it'd just be a messagebox giving you a message. What would I change in the script? Would I delete the if state == 1 part?
I still want to be able to click on the guard after the message box has disappeared and have the dialogue box appear. Because as of now, when I click on him, nothing is happeneing.
User avatar
tannis
 
Posts: 3446
Joined: Sat Dec 09, 2006 11:21 pm

Post » Fri May 27, 2011 2:23 pm

To remove the choices in the message box, just delete them from the message command, leaving only the message itself. And yes, the ( state == 1 ) block goes as well.

You can't talk to the guard is because the player's menus are all still disabled.
User avatar
BRIANNA
 
Posts: 3438
Joined: Thu Jan 11, 2007 7:51 pm


Return to III - Morrowind