Jump to content

Requesting some scripting help for Enclave Commander


enclave1488

Recommended Posts

Hi,

 

I have been modifying the Enclave Commander for my own needs and everything has worked out well enough so far to modify the scripts to change the menu of the Radio and what type of troops to call in etc...

Now I want to change the script so that each platoon that gets called in costs money (caps).

Reason being is because I do not want troops to be free, I want it to cost me so that the Radio reinforcements are a luxury not something granted and free.

I will copy/paste the script here and perhaps some of you good folks could tell me what lines would have to be added, because my scripting experience is still very low and only enough to alter scripts but not come up with entire new lines to change the script to make this idea of mine work.

I appreciate any help given and offer my thanks in advance for anything you can do to help me with this.

Here is what the script looks like:

 

 

 

: scn J3XVertibirdComEffectScript

short button

;short doonce

; 0 = nada

; 1 = Have selected button, shall summon ship

short submenu ;2 = Ground, 3 = Air Support, 4 = Squad commands, 5 = Ground2, 6 = Ground3, 8 = Ground4, 9 = Ground5

float offset

 

;J3XVertibirdSoldierAIOrder

; 0= Follow

; 1 = Guard

; 2 = Wait

; 3 = Dismiss

 

begin scripteffectstart

showmessage J3XVertibirdRadioBeaconMessage

set submenu to 1

endif

end

 

begin scripteffectupdate

set button to getbuttonpressed

;========================= NORMAL MENU =====================

if submenu == 1

if button == 0 ; NOTHING, GIVE BACK THE COM

player.additem J3XVertibirdCom 1 0

set submenu to 7

 

elseif button == 1 ;GROUND SUPPORT

showmessage J3XVertibirdComMessageGroundSupport

set submenu to 2

 

elseif button == 4 ;GROUND SUPPORT2

showmessage J3XVertibirdComMessageGroundSupport2

set submenu to 5

 

elseif button == 5 ;GROUND SUPPORT3

showmessage J3XVertibirdComMessageGroundSupport3

set submenu to 6

 

elseif button == 6 ;GROUND SUPPORT4

showmessage J3XVertibirdComMessageGroundSupport4

set submenu to 8

 

elseif button == 7 ;GROUND SUPPORT5

showmessage J3XVertibirdComMessageGroundSupport5

set submenu to 9

 

elseif button == 3 ; AIR SUPPORT

;set J3XVertibirdSoldierAIOrder to 1

;player.additem J3XVertibirdCom 1 0

showmessage J3XVertibirdComMessageAirSupport

set submenu to 3

 

elseif button == 2 ; SQUAD COMMANDS

 

;player.additem J3XVertibirdCom 1 0

showmessage J3XVertibirdComMessageSquadCommands

set submenu to 4

endif

;========================= GROUND SUPPORT =====================

elseif submenu == 2

if button == 0

placeatme J3XVertibirdTransport 1

elseif button == 1

placeatme J3XVertibirdTransport02 1

elseif button == 2

placeatme J3XVertibirdTransport03 1

elseif button ==3

placeatme J3XVertibirdTransport04 1

endif

showmessage J3XVertibirdRadioBeaconMessage

set submenu to 1

;========================= GROUND SUPPORT2 =====================

elseif submenu == 5

if button == 0

placeatme J3XVertibirdTransport05 1

elseif button == 1

placeatme J3XVertibirdTransport06 1

elseif button == 2

placeatme J3XVertibirdTransport07 1

elseif button ==3

placeatme J3XVertibirdTransport08 1

elseif button == 4

placeatme J3XVertibirdTransport09 1

elseif button == 5

placeatme J3XVertibirdTransport10 1

elseif button ==6

placeatme J3XVertibirdTransport11 1

elseif button ==7

placeatme J3XVertibirdTransport12 1

endif

showmessage J3XVertibirdRadioBeaconMessage

set submenu to 1

;========================= GROUND SUPPORT3 =====================

elseif submenu == 6

if button == 0

placeatme J3XVertibirdTransport13 1

elseif button == 1

placeatme J3XVertibirdTransport14 1

elseif button == 2

placeatme J3XVertibirdTransport15 1

elseif button ==3

placeatme J3XVertibirdTransport16 1

endif

showmessage J3XVertibirdRadioBeaconMessage

set submenu to 1

;========================= GROUND SUPPORT4 =====================

elseif submenu == 8

if button == 0

placeatme J3XVertibirdTransport17 1

elseif button == 1

placeatme J3XVertibirdTransport18 1

elseif button == 2

placeatme J3XVertibirdTransport19 1

elseif button ==3

placeatme J3XVertibirdTransport20 1

endif

showmessage J3XVertibirdRadioBeaconMessage

set submenu to 1

;========================= GROUND SUPPORT5 =====================

elseif submenu == 9

if button == 0

placeatme J3XVertibirdTransport21 1

elseif button == 1

placeatme J3XVertibirdTransport22 1

elseif button == 2

placeatme J3XVertibirdTransport23 1

elseif button ==3

placeatme J3XVertibirdTransport24 1

endif

showmessage J3XVertibirdRadioBeaconMessage

set submenu to 1

;========================= AIR SUPPORT =====================

elseif submenu == 3

if button == 0

placeatme J3XVertibirdStrike 1

elseif button == 1

placeatme J3XVertibirdStrike02 1

elseif button == 2

placeatme J3XVertibirdStrike03 1

endif

showmessage J3XVertibirdRadioBeaconMessage

set submenu to 1

;========================= SQUAD COMMANDS =====================

elseif submenu == 4

if button == 0

set J3XVertibirdSoldierAIOrder to 0

elseif button == 1

set J3XVertibirdSoldierAIOrder to 1

elseif button == 2

set J3XVertibirdSoldierAIOrder to 2

else

set J3XVertibirdSoldierAIOrder to 3

endif

showmessage J3XVertibirdRadioBeaconMessage

set submenu to 1

 

endif

end

 

I know I'll have to create a new Message if the player does not have sufficient caps to call in a particular platoon, that would be referenced in the script.

I just don't know what lines would have to be added exactly where in the script to add a cost requirement for each platoon.

Once again, I appreciate any help given to me :thumbsup:

Edited by enclave1488
Link to comment
Share on other sites

  • Recently Browsing   0 members

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