Aller au contenu

Photo

Conversation/Dialogue Action: Script: Parameter -- help!


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
BloodsongVengeance

BloodsongVengeance
  • Members
  • 590 messages
heyas;

   ooooookay, so i want to run a script from a dialogue line.  there isn't much on the wiki about that part. so...  does anybody know how to do this and how you control it?  and what the parameters slot is for?  i tried making custom global int parameters, but they wouldn't show up in the list.

 if i were to foolishly pick a global parameter from this list and pass it to my script, how would i then check which parameter got passed? 

  and, are scripts that go in the action script slot supposed to use main or startingconditional?

#2
_L_o_B_o_

_L_o_B_o_
  • Members
  • 117 messages

BloodsongVengeance wrote...

 and what the parameters slot is for?  i tried making custom global int parameters, but they wouldn't show up in the list.  if i were to foolishly pick a global parameter from this list and pass it to my script, how would i then check which parameter got passed?


Take a look here. Basically you can only set one parameter and it has to be an int:

http://social.biowar...-4970029-1.html

BloodsongVengeance wrote...
and, are scripts that go in the action script slot supposed to use main or startingconditional?


I only use main, but it seems that you can use startingconditional too.

#3
Sunjammer

Sunjammer
  • Members
  • 925 messages
StartingConditional is used for Condition scripts and main is used for Action scripts.

StartingConditional
scripts return an int value which is evaluated as true or false, where 0 is false and anything else is true. If the return value is 0 (i.e. the condition is false) the line will not be shown to the Player.

If you use a StartingConditional script in for Action the returned value is ignored.

Modifié par Sunjammer, 17 octobre 2010 - 06:48 .


#4
BloodsongVengeance

BloodsongVengeance
  • Members
  • 590 messages
heyas;



no, im an idiot. its not sending the parameters its sending... duh, whether the parameter is TRUE or FALSE.





instead, i'm using sunjammer's info to spring the plot script by making up and calling checks on my plot flags (defined), and using THOSE to have the script decide what to do. which... probably isn't what it's designed for, but i don't feel like writing one script for each action i want to perform. the only wiggy thing about this is... you can't do a conditional check on the same line you're doing this defined flag 'check.' :X


#5
_L_o_B_o_

_L_o_B_o_
  • Members
  • 117 messages

BloodsongVengeance wrote...
no, im an idiot. its not sending the parameters its sending... duh, whether the parameter is TRUE or FALSE.


I think you can't use a constant like TRUE/FALSE as parameter. You have to type an integer, for example, 5. It worked for me :mellow:

Modifié par _L_o_B_o_, 21 octobre 2010 - 11:35 .


#6
Mengtzu

Mengtzu
  • Members
  • 258 messages

_L_o_B_o_ wrote...

BloodsongVengeance wrote...
no, im an idiot. its not sending the parameters its sending... duh, whether the parameter is TRUE or FALSE.


I think you can't use a constant like TRUE/FALSE as parameter. You have to type an integer, for example, 5. It worked for me :mellow:


You're right you can't send TRUE and FALSE, but you can send 1 and 0.  You should be able to then treat them as TRUE and FALSE in your script, since those are constants for 1 and 0 respectively.