Home   Help Search Login Register  

Author Topic: Random conversation  (Read 693 times)

0 Members and 1 Guest are viewing this topic.

Tinky the target

  • Guest
Random conversation
« on: 26 Sep 2003, 00:07:30 »
During one of my missions, there is a rather long dirving sequence...SO i thought i would have the 3 occupants make random comments, or maybe a random coversation.

Having little scripting knowledge, this is where i turn to you...the brainy peeps.

I assumed it would work like this, within the script a number is random chosen (i believe there is a random number selector comman)...this could be entered as a variable....which would nthen be called.

Now, the conversations could have number labels.  

basically when a number is randomly chosen and called, I would like the script to jump to the part of the script labelled with that number... confusing???? ;D

That way, each time the mission is played, there should be a different conversation during the driving section....

Thanks for any help

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Random conversation
« Reply #1 on: 26 Sep 2003, 00:22:28 »
_rnd = random 3

? _rnd <= 1 : goto "3"
? _rnd <= 2 : goto "2"

#1
wateveruwant
exit

#2
wateveruwant
exit

#3
wateveruwant
exit

dats wat u lookin 4 ?

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Tinky the target

  • Guest
Re:Random conversation
« Reply #2 on: 26 Sep 2003, 00:45:23 »
Yeah mate...exactly what i was after!!!  8) 8) 8)

Cheers ;D

Tinky the target

  • Guest
Re:Random conversation
« Reply #3 on: 26 Sep 2003, 01:00:51 »
Dont mean to be a pain. But could you explain how this works?  It might help in the furutre as I think a random chat-o-script could have multiple uses.

As far as I can see (with my limited understanding)

With this script...if the random number is less than or equal to 1...it plays label 3.

If the the random number is lessthan or equal to 2...then it plays label 2.

so if it isnt less than or equal to 1 or 2 then i assume it plays label 1???

Thanks
« Last Edit: 26 Sep 2003, 01:01:09 by Tinky the target »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Random conversation
« Reply #4 on: 26 Sep 2003, 01:05:19 »
yes it is ;)

wat i did is somin like dat

Quote
_rnd = random 3

_Rnd gets num between 0-3

Quote
? _rnd <= 1 : goto "3"

if da num is less or equal 1 it go to label 3

Quote
? _rnd <= 2 : goto "2"

if da num is less or equal 2 it go to label 2 (i already know dat its bigger dan 1 cuz it didint go 2 label 3 b4 - so now i dont have 2 check if its biger dan 1)

now if its not smaller dan 2 da script just continue readin - nd gets 2 label 1 w/o me telin it 2 do

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Tinky the target

  • Guest
Re:Random conversation
« Reply #5 on: 26 Sep 2003, 13:18:09 »
well now it makes sense....I think.

Thanks LCD