Issue with Message Boxes

Post » Wed Jun 20, 2012 7:40 am

I've made a custom message with each button doing a certain function. But, when I click Button 1, I need to press it twice. The same happens with Button 2, where I need to hit it 3 times. This issue repeats itself with all the buttons. Any help?

Scriptname aaaMenu extends objectreferenceMessage Property aMessage  Auto  Actor Property aP2  Auto  Race Property rArgonian  Auto  Event OnActivate(ObjectReference akActionRef)	 If aMessage.Show() == 0		  aP2.SetRace(rArgonian)	 Elseif aMessage.Show() == 1		  aP2.OpenInventory(true)	 Elseif aMessage.Show() == 2		  aP2.SetScale(2.0)	 Elseif aMessage.Show() == 3		  Game.ShakeCamera(afDuration = 5)	 EndifEndEvent
User avatar
Timara White
 
Posts: 3464
Joined: Mon Aug 27, 2007 7:39 am

Post » Wed Jun 20, 2012 4:27 am

Try:

Scriptname aaaMenu extends objectreferenceMessage Property aMessage  Auto  Actor Property aP2  Auto  Race Property rArgonian  Auto  Event OnActivate(ObjectReference akActionRef)        int response = aMessage.Show()     if(response ==0) 		  aP2.SetRace(rArgonian)	 Elseif (response == 1)		  aP2.OpenInventory(true)	 Elseif (response == 2)		  aP2.SetScale(2.0)	 Elseif (response == 3)		  Game.ShakeCamera(afDuration = 5)	 EndifEndEvent
User avatar
Natasha Callaghan
 
Posts: 3523
Joined: Sat Dec 09, 2006 7:44 pm

Post » Wed Jun 20, 2012 11:47 am

Try:

Scriptname aaaMenu extends objectreferenceMessage Property aMessage  Auto  Actor Property aP2  Auto  Race Property rArgonian  Auto  Event OnActivate(ObjectReference akActionRef)		int response = aMessage.Show()	if(response ==0)		  aP2.SetRace(rArgonian)	 Elseif (response == 1)		  aP2.OpenInventory(true)	 Elseif (response == 2)		  aP2.SetScale(2.0)	 Elseif (response == 3)		  Game.ShakeCamera(afDuration = 5)	 EndifEndEvent

Thank You!
User avatar
Charleigh Anderson
 
Posts: 3398
Joined: Fri Feb 02, 2007 5:17 am


Return to V - Skyrim