Go Back   Savage 2: A Tortured Soul Forum > Savage 2 Modding

Notices

Savage 2 Modding Discussion of all things related to making mods of Savage 2

Reply
 
Thread Tools Display Modes
Old 09-21-2013, 11:21 AM   #1
jakisdziad

 
Join Date: Jan 2009
Posts: 28
Thanks: 2
Thanked 1 Time in 1 Post
Default skill toggle MK2

HTML Code:
if #StringEquals(|#InventoryEnabled4|#,true)# "goto LABEL1"
else "goto LABEL2"

goto END

@LABEL1
    if #StringEquals(|#SelectedItem|#,4)# "goto LABEL2"
    else "Action Inventory4"
goto END

@LABEL2
    if #StringEquals(|#InventoryEnabled5|#,true)# "Action Inventory5"
    else "goto LABEL3"
goto END

@LABEL3
    if #StringEquals(|#InventoryEnabled4|#,true)# "Action Inventory4"
    else "Action Inventory0"
goto END

@END
Selects only Enabled skill, if no skill Enabled script switching Inventory to melee. Set any pairs of Inventory (current is for scout eye/demo) and exec this script by one key bind.

Any way to pass params to script? Like "exec file param1 param2" ?

Last edited by jakisdziad; 09-21-2013 at 11:34 AM.
jakisdziad is offline   Reply With Quote
Old 09-21-2013, 12:15 PM   #2
Durwyn

 
Join Date: Jul 2011
Location: Belgium
Posts: 264
Thanks: 47
Thanked 67 Times in 54 Posts
Default

Quote:
Originally Posted by jakisdziad View Post
Any way to pass params to script? Like "exec file param1 param2" ?

You can't pass parameters to external scripts (internal ones need maps editing), so you need to define vars before executing the script, and inside the script use those vars.

Quote:
Createvar string var_param1
Createvar string var_param2
Quote:
<button
height="1"
width="1"
hotkey="my_hotkey"
onhotkey="set var_param1 #value1#;set var_param2 #value2#;Exec "my_script.cfg" "
/>
__________________
Operating System: Windows 7 x64
Graphic card : Geforce GT 540M
RAM : 8gb
Savage2MapsAI
Durwyn is offline   Reply With Quote
Old 09-21-2013, 12:39 PM   #3
jakisdziad

 
Join Date: Jan 2009
Posts: 28
Thanks: 2
Thanked 1 Time in 1 Post
Default

Workaround :P

After calling in CFG "Action QuickAttack" my QuickAttack button is blocked until I click it again, any solution for that?

Last edited by jakisdziad; 09-21-2013 at 12:47 PM.
jakisdziad is offline   Reply With Quote
Old 09-21-2013, 01:49 PM   #4
Durwyn

 
Join Date: Jul 2011
Location: Belgium
Posts: 264
Thanks: 47
Thanked 67 Times in 54 Posts
Default

What did you write in your cfg?
__________________
Operating System: Windows 7 x64
Graphic card : Geforce GT 540M
RAM : 8gb
Savage2MapsAI
Durwyn is offline   Reply With Quote
Old 09-21-2013, 02:17 PM   #5
jakisdziad

 
Join Date: Jan 2009
Posts: 28
Thanks: 2
Thanked 1 Time in 1 Post
Default

gadget placement after skill activation

Action Inventory5
Action QuickAttack (after this, have to press once mouse QuickAttack to get mouse Quick Attack to work again)

also

Action Inventory5
Sleep 300
Action Inventory4 (not changing to Inventory4)
jakisdziad is offline   Reply With Quote
Old 09-21-2013, 09:26 PM   #6
Durwyn

 
Join Date: Jul 2011
Location: Belgium
Posts: 264
Thanks: 47
Thanked 67 Times in 54 Posts
Default

Did you manage to do what you want?

I just tested Action InventoryX with commander, and it works great. But i don't need to add "QuickAttack" (ofc)

edit: i tested by modifying the interface, not by making my own script file. (e.g Action('Inventory9')
__________________
Operating System: Windows 7 x64
Graphic card : Geforce GT 540M
RAM : 8gb
Savage2MapsAI

Last edited by Durwyn; 09-21-2013 at 09:29 PM.
Durwyn is offline   Reply With Quote
Old 09-23-2013, 08:36 AM   #7
jakisdziad

 
Join Date: Jan 2009
Posts: 28
Thanks: 2
Thanked 1 Time in 1 Post
Default

Tried to do this by interface hot keys and same problems occurred...
jakisdziad is offline   Reply With Quote
Old 01-03-2015, 11:08 AM   #8
arslan1

 
Join Date: Jan 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Did you manage to do what you want?

I just tested Action InventoryX with commander, and it works great. But i don't need to add "QuickAttack" (ofc)
__________________
You can easily check out our high quality a+ lab which prepares you well for the real security plus certification You can also get success in real passguide exam with the quality comptia network+ and selftestengine.
arslan1 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 01:47 PM.