Help with Message Box Options

Post » Sun Nov 18, 2012 9:03 pm

Hey guys I need some help with message box options (Yes, No). Here is script attached to an actor.

The premise is that the giant fish (HISGSF) is impervious to damage of all types. So in order to kill it, you need to force poison down it's throat. When you do this it dies after a few seconds. Upon death, the player can reach inside its gob and remove a legendary pearl.

Spoiler

Scriptname HISGSFDeath extends ObjectReference  Quest Property HISLQ1  Auto  Message Property HISLQ1Message  Auto  Message Property HISLQ1Message2  Auto  MiscObject Property HISGSFPoison  AutoActor Property HISGSF  AutoActor Property Player  AutoMiscObject Property HISGSFPearl  AutoEvent OnActivate(ObjectReference akActionRef)	if (akActionRef == Player) && (HISLQ1.GetStage() >= 30)	   ; Do Nothing	  elseif (akActionRef == Player) && (HISLQ1.GetStage() == 40) && (Player.GetItemCount(HISGSFPoison) == 1); if the quest is at stage 40 fish alive		   HISLQ1Message.Show()	 Player.RemoveItem(HISGSFPoison, 1)Utility.Wait(5)			HISGSF.Kill()	  elseif (akActionRef == Player) && (HISLQ1.GetStage() == 45); if the quest is at stage 45 fish dead		   HISLQ1Message2.Show()   Game.FadeOutGame(false, true, 2.0, 1.0)	Player.AddItem(HISGSFPearl, 1)elseif (HISLQ1.IsCompleted());Do nothing   else       ;do nothing  endifendEvent

Message box 1 reads - You force the poison down it's throat
Message box 2 reads - You climb inside it's mouth to retrieve the pearl

I would like it to be a Yes or No message box. If yes, it does the action, if No, the box closes and nothing happens. I want to do it like that simply because the player then has the choice to kill the massive fish or watch it swim about some more.

Any help as always is appreciated :smile:

EDIT

As you can see I'm getting pretty handy at scripting, all of that was scripted from memory last night. Thanks for the training lads and ladies :wink:
User avatar
Rebecca Dosch
 
Posts: 3453
Joined: Thu Jan 18, 2007 6:39 pm

Post » Sun Nov 18, 2012 1:04 pm

Set up an Int variable called Response or Button or something like that. Then, when the player can retrieve the pearl, follow this:

;unrelated script hereResponse = PearlRetrieveMSG.Show()If Response == 0 ;Yes   ;Retrieve pearlElse ;No   ;Do nothingEndIf;unrelated script here
User avatar
Evaa
 
Posts: 3502
Joined: Mon Dec 18, 2006 9:11 am

Post » Sun Nov 18, 2012 11:25 am

Set up an Int variable called Response or Button or something like that. Then, when the player can retrieve the pearl, follow this:

;unrelated script hereResponse = PearlRetrieveMSG.Show()If Response == 0 ;Yes   ;Retrieve pearlElse ;No   ;Do nothingEndIf;unrelated script here

Brilliant I'll try that out later thanks mate :)
User avatar
Imy Davies
 
Posts: 3479
Joined: Fri Jul 14, 2006 6:42 pm

Post » Sun Nov 18, 2012 10:58 am

Guys I need some help please... desperate.

My actor isn't dying. As you can see in my script, I've made the actor (which the script is attached to anyway) an actor property, and have the following line in the script: HISGSF.Kill()

But he just isn't dying....

Any ideas?

EDIT

Aaaaaannnnnddddd now it's working. Funny that :shrug:

Cool idea for a quest to kill something though I think ;)
User avatar
loste juliana
 
Posts: 3417
Joined: Sun Mar 18, 2007 7:37 pm


Return to V - Skyrim