Hello ,
i'm having a little problem with score related events ...
i want the character to be able to get out of the room by using the door ONLY when he gets a score of 40
so i did this in the room script , on the interact event with the hotspot :
- conditional -if a variable is set to a certain value (game.score , 40)
- Player go to a different room (at specific co -ordinates ) (2,86,178)
but its not working ... cant seem to understand why ...
* i also tried to do this in the GLOBAL script to get a message when everything else is done :
function on_event(int event, int data) {
if (event == GOT_SCORE && data == 40)
Display ( "nothing else to do here ... " ); }
what am i doing wrong ?
thanks
What DOES it do? Or does it do nothing? Make sure the 'move character to diffrent room...' is nested inside the conditional. Also, you should set it to check if the score si 40 or over, or, if the score gets to 41, the script wont run. (Sorry I havent worked with the interaction editor in ages, I've only used 'Run Script')
not sue what yu are doing wrong ,,
but try this when the player interacts with the hot spot
run script
then click edit script and put this in there under the green header
if (game.score > 39)
NewRoomEx(2,86,178);
else if (game.score < 39)
DisplayMessage(527);
then create a global message in slot 527 or change the number to reference yur message
this will move yu to room 4 at the co-ords if yur score is greater than 39 (ie 40)
and display the message if yur score is less than 39
* thanks CB , it worked :)
not sure what i'd done wrong either ... I think i got confused somewhere by using the window editor on the interact event , but im not sure ...
anyway , I' m using the SCRIPT for this event , not the window functions
* TK: basically it adds points to the score when actions are made or when dialogs are spoken or when objects are taken until there is nothing else to do in the room .
if the character tries to open the door BEFORE everything is done he's told somethings still need be doing before he can leave and the door wont "open"
he can only leave the room when the score reaches a certain point .
good stuff glad I helped!