Can someone take a look at this short script?

Post » Sun Sep 02, 2012 3:00 pm

I'm probably missing something trivial, but seeing as how I got back into the CS after a year I forgot how to work with message boxes.

ScriptName PGArrow07Holder1Scriptshort checkshort choosingshort choicebegin onActivateif(check == 0 && PGArrow07.puzzle == 0)  set choosing to 1  set check to 1endifendbegin GameModeif(choosing == 1)  MessageBox "Which skull should I place on the first holder?" "Topaz Skull" "Emerald Skull" "Sapphire Skull"  set choosing to 2elseif(choosing == 2)set choice to getbuttonpressedif(choice == 0)  PGArrow07Skull1ARef.enable  PGArrow07Skull1BRef.disable  PGArrow07Skull1CRef.disable  PGArrow07Skull2ARef.disable  PGArrow07Skull3ARef.disable  PGArrow07SkullXARef.disableelseif(choice == 1)  PGArrow07Skull1BRef.enable  PGArrow07Skull1ARef.disable  PGArrow07Skull1CRef.disable  PGArrow07Skull2BRef.disable  PGArrow07Skull3BRef.disable  PGArrow07SkullXBRef.disableelseif(choice == 2)  PGArrow07Skull1CRef.enable  PGArrow07Skull1BRef.disable  PGArrow07Skull1ARef.disable  PGArrow07Skull2CRef.disable  PGArrow07Skull3CRef.disable  PGArrow07SkullXCRef.disableendifset choosing to 3set check to 0endifend

Basically, there are three "holders", each one having a script and three skulls above it. When the player chooses the skull to place, the skull above the holder should be enabled, while the skulls of the same color on other holders, as well as any other skull on the holder in question should be disabled.
User avatar
Fanny Rouyé
 
Posts: 3316
Joined: Sun Mar 25, 2007 9:47 am

Post » Sun Sep 02, 2012 3:50 pm

GetButtonPressed takes around 15 frames to process. You need to wait until Choice != -1 before you increment Choosing to 3.
User avatar
Wanda Maximoff
 
Posts: 3493
Joined: Mon Jun 12, 2006 7:05 am


Return to IV - Oblivion