| 09-24-2002, 05:07 AM | #1 |
Guest | Okay, im trying to make an RPG, and i want the townsfolk to say random things to the player that comes up, and say some other different things again whenever they back to them. I can't find the trigger to do this!! I see random number, but i just want to create a set of bunch of dialogues, and have them be randomized and said to the player every time they approach. For example, "Greetings, me lord! 'tis a very ugly day indeed!" "Bah! Get away from me!" "Oye, me lord, how ye be doing?" and so on........i just want one of those to be said every time the player comes to the NPC. Is there any way to do this? One more question......... I only want the townsfolk to say these things when a specific unit comes to them, so this is what i put: A unit comes within 300 range of Noblewoman(0092)<gen> and for conditions its: Triggering unit is equal to (variable) Player1UNTRAINED. The problem is, i want the npc to say this to ALL variables with this name (Player2UNTRAINED,Player3UNTRAINED..etc) And if i put, "Triggering unit is equal toPlayer1UNTRAINED, 2, 3, and 4 all in conditions, it doesnt seem to work, because i would need to control all those units and move them all to the NPC for the her to say it. I don't want to have to create multiple triggers for each player, triggering unit is equal to player2, then make another that says triggering unit is equal to player3......etc...thats just too tedious. I tried using the OR condition, but there are only 2 things you can use for OR. Is there any way you could make an OR condition where it would say, "Triggering unit is equal to this, OR this, OR, this, OR.....etc......" Thanks alot!!! |
| 09-24-2002, 08:46 AM | #2 |
Guest | 1) Set RandomNum = Random integer between 1 and Numberoftransmissions If RandomNum = 1 then do Send Transmission..... If RandomNum = 2 then do Send Transmission..... Etc. 2) Make your conditions in the OR another OR condition until you have enough. |
| 09-24-2002, 01:13 PM | #3 |
Guest | Thank you!!!!! |
| 09-24-2002, 01:46 PM | #4 |
Guest | Arg, i dont understand. What is it exactly i have to do? I made an integer variable, set it as a random number between 1 and 16...but how can i make it so it actually initializes and randomizes every time a player walks up to an npc? I know how to set in the dialogues and stuff...i just dont know how to make it randomize and say different thigs. I understand tthe second one though, thank you! |
| 09-25-2002, 02:56 AM | #5 | |
Guest | Quote:
Action: Set Variable (whatever) to a random value between 1 and 16 Action: If (whatever) = 1 Then Display "blah blah" Else Do nothing another way to do this which might be nicer is to create a string array at map init, and place the things you want to say into that array. Set Variable stringarray[0] = "blah blah" Set Variable stringarray[1] = "blah blah blah!" then, when you want to display it, it's simple: Game Message: stringarray[Random Number between 0 and X] I'd do it with the array of strings - means less work in the future if you need to change the messages :) :ggani: |
| 09-25-2002, 03:54 AM | #6 |
Guest | That's probably a better way. |
