Jump to content

Scripting Help With The 'Get' function


Guest deleted156886133

Recommended Posts

Guest deleted156886133

I'm attempting to alter an existing script that has an 'if/endif' sequence that dictates which sound to play whenever I hit my slave.

See below excerpt:

 

Spoiler
if ( mpunish == 1 )
set mpunish to 0
if ( random100 <= 50)
PlaySound "Hand to Hand Hit 2"
messagebox "Being of a somewhat sadistic nature, you beat up your slave with great pleasure."
elseif ( random100 > 50)
PlaySound "Health Damage"
messagebox "You punish your slave with a lot of pain. After all, they need to be put in their place every once in awhile."
endif
endif

 

 
Now, as it stands, this is applicable whether the slave is male or female. Suppose I wanted to add gender specific sounds? Is there a way to check that within the script with a 'Get' function? Looking through the script function list, I did not see a 'GetGender', if one exists. Aside from creating two seperate scripts, is there a way to pull this off within one script?
 
-Update-
Immediatly after I posted this, it hit me! Since I already had a variable called 'mpunish', what if I duplicate that one, declare another variable, call it 'fpunish', then edit the duplicate to reflect that. So, now I have split the sequence into male and female, respectively.
 
It worked.
 
Spoiler

if ( mpunish == 1 )
set mpunish to 0
if ( random100 <= 50)
PlaySound "M_SlavePunish_01"
messagebox "Being of a somewhat sadistic nature, you beat up your slave with great pleasure."
elseif ( random100 > 50)
PlaySound "M_SlavePunish_02"
messagebox "You punish your slave with a lot of pain. After all, he needs to be put in his place every once in awhile."
endif
endif

if ( fpunish == 1 )
set fpunish to 0
if ( random100 <= 50)
PlaySound "F_SlavePunish_01"
messagebox "You relish in your slave's pleas to stop and beat her into submission. She collapses, unconscious."
elseif ( random100 > 50)
PlaySound "F_SlavePunish_02"
messagebox "With a swift backhand and a punch to her jaw, your slave is knocked unconscious even before she falls."
endif
endif

 

 
Since these variables are set from within topic info responses, I created two seperate responses, male and female and simply referenced the respective script variables.
 
No reply necessary. Maybe this will help someone.
Edited by UsernameWithA9
Link to comment
Share on other sites

  • Recently Browsing   0 members

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