| Blockland Forums > Help |
| More than one variable needed to activate something? |
| (1/2) > >> |
| Zenthrox:
Say I have three things (variable-wise) that I need to activate a button. Receive a quest item: (Onactivate -> client -> modVariable -> [questitem1] [set] [1] How do I event the button so it'll only activate when the player has collected all three, and denies anyone missing one or more of these artifacts? |
| Zenthrox:
Bump, because I need this. |
| Corbiere:
When you find an artifact, you could add a 'treasurefound' variable... that way, the event like would be 0 - Onactivate : client : ifvariable : treasurefound == 3 1 3 1 - Onvariabletrue : client : centerprint : Found etc. 2 - Onvariabletrue : player: additem : rewards 3 - Onvariabletrue : client : VCEmodvariable : treasurefound : set :0 |
| Corbiere:
--- Quote from: Corbiere on March 07, 2010, 11:03:01 AM ---When you find an artifact, you could add a 'treasurefound' variable... that way, the event like would be 0 - Onactivate : client : ifvariable : treasurefound == 3 1 3 1 - Onvariabletrue : client : centerprint : Found etc. 2 - Onvariabletrue : player: additem : rewards 3 - Onvariabletrue : client : VCEmodvariable : treasurefound : set :0 --- End quote --- If you make the 1 3 into 1 5 you could do: 4 - Onvariablefalse : client : centreprint : Not finished quest yet 5 - Onvariablefalse : client : bottomprint : <var:cl:treasurefound> |
| Chefkokkie:
Event 0: onActivate -> Brick -> IfVariable -> [Client] [questitem1] [1 2] Event 1: onVariableFalse -> Client -> Chatmessage -> [You don't have all items] Event 2: onVariableTrue -> Brick -> IfVariable -> [Client] [questitem2] [3 4] Event 3: onVariableFalse -> Client -> Chatmessage -> [You don't have all items] Event 4: onVariableTrue -> Brick -> IfVariable -> [Client] [questitem3] [5 7] Event 5: onVariableFalse -> Client -> Chatmessage -> [You don't have all items] Event 6: onVariableTrue -> Client -> Chatmessage -> [The button activates] Event 7: onVariableTrue -> Whatever the button does goes here Hope you understand what I did here. New-reply: That works too, it is in fact a quicker way to do it. |
| Navigation |
| Message Index |
| Next page |