Jump to content

Option Menu Script error...


Deleted2746547User

Recommended Posts

I thought that line looked a little funny, but didn't know what you were trying to do with it.

 

 

I tell you, the whole thing looks greek to me. I could spend 18,000 hours studying scripting and tutorials and it would all still look funny to me. It's no so much the concept I don't get but the format. (I get the idea of console commands).

 

It's just linking them together..

Edited by Guest
Link to comment
Share on other sites

You'v got powerup installed now right? Run it and save yourself a ton of hassle. Let's see what line(s) the compiler is choking on.

 

So, now I have it working almost perfectly except for a few more details.

 

#1 The message if you don't have enough supplies doesn't get called. I need to fix that! <<I can't seem to proper format place after option 0 button to place the ShowMessage or the proper endif, etc. after that.

 

#2 If you do have enough and start construction I'd really like three things to happen.

 

A.) A timer starts and the structure wont appear for X amount of time.

 

B.) A message telling you about A

 

C.) You get another message when it is finally 'enabled'.

 

 

ANY SUGGESTIONS?

 

BTW THANKS AGAIN FOR BOTH OF Y'alls help on that!

 

FWIW??: What's weird: in the first iteration of this script (one without a menu) I had to do short variables for all the ingredients required to build the structure but in this one, I didn't... is there a reason. It seems like if required in one it should be required coding in the second. But this code works: if you don't have the supplies, it tells you the resources needed message and all is good. If you do have the supplies, it removes them and builds the structure.

 

scn BlackbriarWASHOERFATowerBuildScript

short button
short buttonVar
short ButtonPressed

begin OnActivate

      ShowMessage BlackbriarRFAWashoeTowerChoiceMesg
    
       endif

end

begin MenuMode 1001

if (ButtonPressed == 0)
    set Button to GetButtonPressed
       If Player.GetItemCount BlackbriarHammer >= 1 && player.GetItemCount BlackbriarMetalResource >= 10 && player.GetItemCount BlackbriarResourceWood >= 3                  
               player.removeitem BlackbriarMetalResource 10
               player.removeitem BlackbriarResourceWood 3
               BlackbriarTowerBuildRef.enable; enables x marker to build radio free america tower
               BlackbriarRadioFreeAmericaTowerActRef.disable; removes the anvil build base activator item from area
               BlackbriarRadioFreeAmericaTowerActRef.markfordelete

       Endif (button == 1)
       
       Endif

End

Edited by Guest
Link to comment
Share on other sites

I spoke too soon... it doesn't work perfectly.

 

If you have the supplies on you to build the structure.. it takes them the moment you activate the item (before you even select the menu item to build.) So, if you have the required building supplies... it takes them from you and still lets you see the menu.

 

If you select the item and don't have the supplies on you...everything works fine.

 

ALSO: I have a second activator that runs a similar script. when you "activate" the one, it automatically activates the other too. ????

 

how would you fix that? :wallbash: :wallbash:

Edited by Guest
Link to comment
Share on other sites

I've also tried it this way but get a compiling/mix match error on line 19 ... a little help fixing it?

 

scn BlackbriarWASHOERFATowerBuildScript

short button
short buttonVar
short ButtonPressed

begin OnActivate

      ShowMessage BlackbriarRFAWashoeTowerChoiceMesg
    
       endif

end

begin MenuMode 1001

set Button to GetButtonPressed

	if (ButtonPressed == 0)
       		If Player.GetItemCount BlackbriarHammer >= 1 && player.GetItemCount BlackbriarMetalResource >= 10 && player.GetItemCount BlackbriarResourceWood >= 3                  
              	player.removeitem BlackbriarMetalResource 10
               	player.removeitem BlackbriarResourceWood 3
               	BlackbriarTowerBuildRef.enable; enables x marker to build radio free america tower
               	BlackbriarRadioFreeAmericaTowerActRef.disable; removes the anvil build base activator item from area
               	BlackbriarRadioFreeAmericaTowerActRef.markfordelete

       Elseif (button == 1)
       
       Endif

End

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...