Wednesday, April 18, 2012

Trigger help: Item Recipes

It's pretty simple... I'm making a map that has elements of a wilderness survival. My biggest trigger problem right now is the item combinations.

This is what I have so far:


Code:
Recipe
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Assemble
Actions
If (All conditions are True) then do (Then actions) elso do (Else Actions)
If - Conditions
((Triggering Unit) has an item of type Stick) Equal to True
((Triggering Unit) has an item of type Stick) Equal to True
Then - Actions
Item - Remove (Item carried by (Casting unit) of type Stick)
Item - Remove (Item carried by (Casting unit) of type Stick)
Hero - Create Big Stick and give it to (Casting unit)
Else - Actions
Floating Text - Create floating text that reads Incorrect items! above (Casting unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% Transparency
Wait 1.50 seconds
Floating Text - Destroy (Last created floating text)

So that works fine for destroying two sticks and replacing it with a big stick... My problem is that if the person uses the Assemble ability with only one stick in his inventory. The stick is destroyed and replaced with a big stick, when it is supposed to require two sticks.

So any help on that would be appreciated. Also if someone could quickly tell me how to center the floating text, it spawns off to the right of user beginning at their origin, like this:

Incorrect items!

O

T

^

Is it just me having to play around with the Z offset? It's not dire for me to have it centered I would just prefer it. So yeah, thanks in advance! I hope I provided enough information.|||I maybe thinks its the condition..

Try this:


Quote:




Recipe

Events

Unit - A unit Begins casting an ability

Conditions

(Ability being cast) Equal to Assemble

Actions

If (All conditions are True) then do (Then actions) elso do (Else Actions)

If - Conditions

((Triggering Unit) has an item of type Stick) Equal to True

((Triggering Unit) has an item of type Stick2) Equal to True

Then - Actions

Item - Remove (Item carried by (Casting unit) of type Stick)

Item - Remove (Item carried by (Casting unit) of type Stick2)

Hero - Create Big Stick and give it to (Casting unit)

Else - Actions

Floating Text - Create floating text that reads Incorrect items! above (Casting unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% Transparency

Wait 1.50 seconds

Floating Text - Destroy (Last created floating text)




Make another stick, so you have 2 seperately Item, you can just name it the same..

- well.. try it out..|||I think you're right about that working, and it is a possible fix, the only problem is it would require a person to find Stick1 and Stick2 seperately... They are randomly strewn about the map, so like I said, it could work but I would prefer it to use just the 1 item. If you've played a wilderness survival game you'll have a good understanding of what I'm going for.

Thanks for your response though, I guess I'll be doing that if I can't figure it out.|||hmm .. I think i got another idea..

Maybe a interger Condition for holding two sticks..

I'll check it out when i come home in a hour, and i will post the trigger exsample|||Alright let me know, I'll be experimenting and working on other things in the mean time.|||i cant figure it out..

Maybe Some Custom Scripts may help, but i havent learned it..|||Or you can make a condition for the "Hero got Item type in item slot 1 and 2" this way it will work.. But if the hero have 1 stick in slot 1 and another item in slot 2, it wont work..... Thats the best i can find out...|||That will definitely work, and I'm now doing that. Thanks for the help!|||Irritable Bowel Syndrome Diet & IBS Recipes. An estimated 15-20% of all Americans have Irritable Bowel Syndrome, and it's a devastating (not to mention incurable) condition. If.

Worse still, much dietary information available for Irritable Bowel Syndrome is outdated and useless - or likely to trigger symptoms (have you been told to eat wheat.

Items in Cart:.

It does mean learning to eat safely by realizing how different foods physically affect the GI tract, and how the same foods can help or hurt both Irritable Bowel Syndrome.

No comments:

Post a Comment