HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

different action on same event?

11-24-2002, 01:51 AM#1
311
ok I got a little mini game in my rpg, and I want it set so you can win different stuff as
1. item
2. gold
3. experience

how do I set this though example: the mini game is where u duel your partner and who ever wins gets either item, gold, or experience how do I set that though? If I put all 3 in actions then itll give me all 3, I want them to all have the same event so I cant just make another trigger with the same event or they will still go off. I either want it random: gold,item, experiace or the player can type battle for exp, battle for gold, and so on. Anyone know how?

I tried variables but I dnt 100% get them I set a trigger as a varible but if I set it then its in the trigger so I use it, how do you just set a variale as whtever you want wtihout using it yet?

example only way I know how to set variable is this
event: player kills player 2
action: give 100 gold
action set this trigger as varible gold winning trigger


well now I used this ^ so this will still go off every time whn I win I cant just straight go to
event: p1 kills p2
action: do varible

sorry kinda hard to explain, hope you can help with what little info I gave

basicly I want it so the event I do I want 1 of 3 things to happn, I kill player player 2, I want 1 of three things to happn, gold, experiece, item
11-24-2002, 02:25 AM#2
MicrosoftXP
you need acouple variables for this to work

First you need an integer variable: x with initial value 0
x is 0 if the player didn't specify they want gold or item etc. (ie no 'fight for gold') non-zero otherwise

actions:
if (x = 0) then do set x = random int between 1 and 3 else nothing

if (x=1) then do give gold
if (x=2) then do give item
if (x=3) then do give exp


NOTE:
you will need an additional trigger that sets x for 'fight for gold' etc.

event:
player x types a chat message containing 'fight for' as A substring
condition:
none
actions:
if string comparison(entered chat string is equal to fight for gold) then do set x=1

etc.. you get the idea.

Trigger two sets x if the player wants to fight for a specific reward
Trigger one gives the reward they specified or selects a random one
11-24-2002, 02:38 AM#3
dataangel
Event
Player owned by Player 1/2 dies (whichever 2 players are fighting each other)
Action
set integervariable = random number between 1 and 3
if integervariable = 1 give killing player 200 gold
if integervariable = 2 give killing unit an item
if intrgervariable = 3 give killing unit experience