Score events problems ...

Started by vangard231, Mon 27/10/2003 03:58:36

Previous topic - Next topic

vangard231


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


Ishmael

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')
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

CB..

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

vangard231


* 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 .



CB..


SMF spam blocked by CleanTalk