You must be logged in to post messages.
Please login or register

Scenario Design and Discussion
Moderated by Sebastien, Mr Wednesday

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Need help in Making my first RPG...
posted 04-14-06 07:57 PM CT (US)   
I am currently undergoing a diverse project in which I hope to release a demo of soon. It is the project 'A Path to War' and I need help in trying to make a trigger which is the whole buying weapons thing.

What I have done so far is made it so when you have money, you're able to buy weapons from the metal workers and merchants located around the city. But I also want to make it that when you run out of money, you can no longer buy anything. The man would just say "Sorry, Captain -no money!" or something. I have made all the triggers for it, but it doesn't work in the way I want it to.

You select the man and he says:

I can upgrade weapons for 5gold (and in which you get 2Attack for) =click on blacksmith to upgrade.

You click on the blacksmith, and the trigger for getting the upgrade kicks in, but the trigger which states that the man says you have no money also kicks is. This is not what I want to happen. Instead, only if you have no money, should the trigger stating that you cannot buy anything kick in, because i had like 10 gold left.

If this made sense, and I'm sure it didn't , does anyone have any ideas on how to overcome this?

[This message has been edited by Mashek331 (edited 04-14-2006 @ 08:00 PM).]

Replies:
posted 04-14-06 08:42 PM CT (US)     1 / 8  
Someone showed me a way to do that...if I remember correctly it takes 3 triggers to know when you don't have ANY money at all, but to know when you don't have enough is a different story. You'd have to do something like this:


Trigger 1: NO GREAT SWORD LIK OMG ;_;
On
Condition: Object in Area Player 1's hero or whatever.
Effect: Dispay Objectives: WTF U DONT HAVE TEH MONEY FOR THIS!

Trigger 2: Great Sword
Off
Condition: Object in Area Player 1's hero or whatever.
Condition: Accumulate Attribute 10 gold player 1
Effect: Display Objectives: OH MY GOD U GOT TEH GRAT SWORD LIK OMG!111oneeleven!11
Effect: Tribute 10 gold from P1 to Gaia
[insert effects here for sword ownage, perhaps you can use a flag system?]
Effect: Trigger deactivate "Trigger 3"
Effect: deactivate Trigger "Trigger 1: NO GREAT SWORD LIK OMG ;_;"

Trigger 3:
On, Looping
Accumulate Attribute 10 gold.
Activate Trigger 2
Decativate Trigger 1

IN THAT ORDER, let me explain why if you don't know.

Triggers go like this


Trigger 1 -> Trigger 2 -> Trigger 3-> Trigger 1 ->...

In that order they would loop over and over, if you put trigger one in trigger twos spot it wouldn't be a good idea, since it would activate it, you'd get that STUPID message and you'd be like GOD THIS IS DUMB!


Also if you don't want it to infinitely buy it, then you can just set it to deactivate trigger three and trigger two, thus ending the circuit, thus ending those three triggers all together.

I hope I helped.

[EDIT]

If you want it a one time deal for buying that item just set trigger 2 to this:

Trigger 2: Great Sword
Off
Condition: Object in Area Player 1's hero or whatever.
Condition: Accumulate Attribute 10 gold player 1
Effect: Display Objectives: OH MY GOD U GOT TEH GRAT SWORD LIK OMG!111oneeleven!11
Effect: Tribute 10 gold from P1 to Gaia
[insert effects here for sword ownage, perhaps you can use a flag system?]
Effect: Trigger deactivate "Trigger 3"
Effect: deactivate Trigger "Trigger 1: NO GREAT SWORD LIK OMG ;_;"

[This message has been edited by SPrinkZ (edited 04-14-2006 @ 10:00 PM).]

posted 04-14-06 09:37 PM CT (US)     2 / 8  
SPrinkZ, there really no reason to have trigger three...Just the first two is all you need. Just as long as you cannot tribute that amount to the player, the trigger will never fire. Just do this...I think it should work.

Trigger One: 1.1 Buying Armor
On
Condition: Object in area(your hero)
Condition: Select object(the smither)
Effect: Display Objective(To buy armor, select the blacksmith)
Effect: Activate trigger Two

Trigger Two: 1.2 Buying Armor
Off
Condition: Object Selected(the blacksmith)
Effect: Tribute gold to player #
Effect: Display Objective: "You have bought armor"
Effect: Activate Trigger Three

Trigger Three: 1.3 Buying Armor(ENOUGH GOLD)
(this one would add the armor if the gold was tributed and it would activate the fourth one if no gold was tributed)

Trigger Four: 1.4 Buying Armor(NO GOLD)
(this one would say why the armor was not tributed)

Wait a minute...I would have to try this before I could figger out how to do the last back up trigger if no gold is tributed...SO I am not totally sure...It might take five or so triggers. I am not very familiar with systems such as these, since I prefer FF and B&D styles over RPG's.


___~ Super Cell 51 ~___
"Live every day as though it was your last."
JESUS SAVES!

[This message has been edited by Super_Cell_51 (edited 04-14-2006 @ 09:42 PM).]

posted 04-14-06 09:56 PM CT (US)     3 / 8  
My trigger set works, yours takes 4 triggers. I win.
posted 04-14-06 10:06 PM CT (US)     4 / 8  
Well I don't know if mine would work for sure, but then again, have you tested yours? And for the winning thing, I'm not trying to win over anybody, I'm just trying to help Mashek here out...(I doubt that I helped you at all though) Like I said, I am not that familiar with these kind of systems, I mainly do B&D/FF style campaigns.

___~ Super Cell 51 ~___
"Live every day as though it was your last."
JESUS SAVES!
posted 04-14-06 10:23 PM CT (US)     5 / 8  
I see...I see...but my system works, just look at it, I'll explain it if you don't get it.

Trigger one is on and active,

Trigger two is off,

Trigger three is on yet not active...

You get 10 gold...

Trigger one is off, trigger two is on.

You step on the area, trigger two activates, donates 10 gold...it activates trigger one, trigger three is active yet not enough gold to trigger.

And it goes on and on like that forever.

posted 04-14-06 10:51 PM CT (US)     6 / 8  
Yes, yes. Don't get me wrong, I understand your concept. I was just thinking that there was a more reliable and efficient way to achieve this effect. Maybe not. I guess I'll quote myself again:

Quoted from Me:

I am not that familiar with these kind of systems



___~ Super Cell 51 ~___
"Live every day as though it was your last."
JESUS SAVES!
posted 04-14-06 11:45 PM CT (US)     7 / 8  
Is it a single player RPG? Because if it is, you can always use AI resource detection (you'll need a "dummy" player for that). It's much more precise.

You can do something like this:
- Add 1 Flag A for each 1 gold;
- Write a script:

(defrule
(cc-players-unit-type-count [number for Flag A] less-than [cost of armor])
=>
(set-goal 1 1)
)

(defrule
(goal 1 1)
=>
(chat-to-all "You have no money you idiot!")
)

(defrule
(cc-players-unit-type-count [Flag A] greater-or-equal [cost]
=>
(set-goal 1 0)
)

(defrule
(not(goal 1 1))
=>
(chat-to-all "Here we go!")
(set-signal 1)
(disable-self)
)

AI SIGNALS can only be sent once. I presume you can only buy the armor once, so I've put it this way. If you can buy it more than once, use "cc-add-resource stone 1", detect it by trigger and then reset the stockpile.

EDIT: I must warn you: this script is pretty lame. I can work on something better if you want me to.

[This message has been edited by Cesar Bernardi (edited 04-14-2006 @ 11:52 PM).]

posted 04-15-06 04:06 AM CT (US)     8 / 8  
@Cesar
That looks really sufficient and reliable, except I have already used 8players, and can't change any of them. It is a single player RPG too. Thanks anyway. But maybe you would know a really reliable trigger one?

@SuperCell:
The first half is really helpful, in a way. Its not overtly in detail, leaving me half the work to do, which is what I want to get away from, because I have no idea what to do. Thanks anyway.

@SPrinkZ:
Thats a fairly good way to do it, except it is a little unclear and not the way I'm after. Thanks for your help anyway.

You see I just need to work out how to get that "No money" trigger to work the way its supposed to. I will put the triggers down the way I done it. I did rush the trigger BTW, and I think i went wrong with trigger 3.

Trigger 1: ++BLACKSMITH SHOP++
Starting condition on and loop on.
-Condition 0 = "Bring object to area" -Hero to area around smithy.
-Condition 1 = Object selected (The smithy)
-Condition 2 = Timer -10Seconds
*Effect0 = Metal Worker: 'I can upgrade the quality of your weapons, so what'll it be?'
*Effect1 = Upgrade Bronze Sword +2 Att = 5 Gold
* Click on the blacksmith to have your weapon strengthened*
*Effect2 = Activate Trigger - "Purchase Upgrade"
*Effect3 = Activate Trigger - "No Gold"

Trigger 2 "Purchase Upgrade"
Starting Condition off. Loop off.
-Condition 0 = Accumulate Gold 10gold
-Condition 1 = Object selected "Blacksmith"
-Effect0 = Change object attack (hero) +2attack
-Effect1 = tribute 5 gold from player 1 to Gaia

Trigger 3 "No Gold"
Starting Condition off. Loop off.
-Condition 0 = Accamulate gold "o" player1
-Condition 1 = Object selected "blacksmith"
-Effect0 = Metal Worker: 'Sorry Captain, no money!'
-Effect1 = Deactivate trigger "Purchase upgrade"

So basically, when you click on the blacksmith to get the upgrade, you get the upgrade and the money is taken off, but the smithy says "Sorry, Captain -no money!". And you can keep doing it, as intended, and when you have no money, the upgrades stop. So that works, except the bit i just mentioned which shouldnt come up. I need help there.

[This message has been edited by Mashek331 (edited 04-15-2006 @ 04:10 AM).]

Age of Kings Heaven » Forums » Scenario Design and Discussion » Need help in Making my first RPG...
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Kings Heaven | HeavenGames