The Story of Dipsung (and all the bugs I can't figure out how to solve)

  • Thread starter Thread starter sheepishgrin
  • Start date Start date
S

sheepishgrin

Guest
ok, so I'm trying to create this neat campaign right. It's about a Panderan Brewmaster named dipsung who has this vision and then feeling a strange danger arise goes out to find his brothers, the Panderan Masters of Earth, Fire, and Storm.

His first task? raise enough money to buy a ticket on a boat heading to the mainland. How? collect tea leaves, make his tea, and then sell it at the marketplace.

now, two problems arise (conflict in the story, not a bug). The teas are rather cheap, and will take forever for him to sell enough. What can he do? well, a band of trolls is terrorizing the northern part of the island and is expanding south. once it destroys the gnoll encampment, it will only be a matter of time before it begins an assault on Portshead. so, help the ppl, make a little extra cash, and voila, first chapter done.

now, for the TECHNICAL problems.

I believe it was silver hawk that helped me with this the first time, but a new problem arises. now, anytime I step into any region, regardless if I have any kind of tea leaf or not, it gives me the tea. I need it to be like this:

Dipsung enters circle of power 1 with the wild tea leaf, he gets ONLY refreshing tea. if he doesn't step in cop with the wild tea leaf or any tea leaf, he gets nothing.

also, I need the trolls to have a buttload of money to create units, AND I need to know how to use the AI I created.

the AI is supposed to send waves of units to attack gnolls. once gnoll leader is dead, it attacks town.

so, yeah, I'd appreciate anything anyone can do.

here are my codes for the tea leaf triggers and AI triggers

Wild Tea Leaf

Code:
Wild Tea Leaves
    Events
        Unit - A unit enters Home <gen>
    Conditions
        (Item carried by (Entering unit) of type Wild Tea Leaves) Equal to (Item carried by (Entering unit) of type Wild Tea Leaves)
    Actions
        Item - Remove (Item carried by (Entering unit) of type Wild Tea Leaves)
        Hero - Create Refreshing Tea and give it to (Entering unit)

Gilead Leaf

Code:
Gilead Leaves
    Events
        Unit - A unit enters Home 2 <gen>
    Conditions
        (Item carried by (Entering unit) of type Leaves of the Gilead Plant) Equal to (Item carried by (Entering unit) of type Leaves of the Gilead Plant)
    Actions
        Item - Remove (Item carried by (Entering unit) of type Leaves of the Gilead Plant)
        Hero - Create Tea of Inner Meditation and give it to (Entering unit)

Brothus Leaf

Code:
Brothus Leaves
    Events
        Unit - A unit enters Home 3 <gen>
    Conditions
        (Item carried by (Entering unit) of type Leaves of the Brothus Plant) Equal to (Item carried by (Entering unit) of type Leaves of the Brothus Plant)
    Actions
        Item - Remove (Item carried by (Entering unit) of type Leaves of the Brothus Plant)
        Hero - Create Dipsung's Speciality Tea and give it to (Entering unit)

Troll AI

Code:
Troll AI
    Events
        Map initialization
    Conditions
        ((Triggering unit) is A structure) Equal to True
    Actions
        AI - Start melee AI script for Player 12 (Brown): war3mapImported\huh.ai

I don't know what Map initilization does at all....

Human AI

looks like the one above.
 
Your conditions should be this:
((Entering unit) has an item of type <some quind of tea>) Equal to True
You can found it under boolean/Hero

Your condition is like this
(Item carried by (Entering unit) of type Wild Tea Leaves) if hero has no Wild Tea Leavs this will return "No Item" or somthing like that.
So it will look like this:
"No Item" equal to "No Item"
and that is true.

In the Troll AI remove the condition. Map Init. has no triggering unit.
 
Yes, just change the condition to the one above.

As for the AI, search for AI Tutorial. Conan wrote a good one.
 
sqrage said:
makes it do the action RIGHT when the map starts

He means when your at the loading screen and your done loading
 
...Why do Trolls need money to create units? Just use the Create Unit every so often via triggers. No AI needed to just spawn Trolls and have them attack every now and then.

Either way, nice idea for a Campaign. Let me know if you want some decoration help, that is what makes Campaigns look better and play better than control Superman and pwn baddies. Brewing Tea that might give different bonuses (besides being able to be sold) is cool, but you might want some extensive decoration to traverse though.

And yes, that is the definition of Initialization--when it starts. But, some (most actually) actions don't work, for whatever reason, right at Initialization. So, I suggest you make one function that starts in .1 seconds and calls a whole bunch of organized triggers to do your bidding, like this trigger orders everyone to do their positions (patrolling), start cinematics, a leaderboard, et cetera.

Oh, if you want, you should make a Spellbook of Dummy abilities (Brew Refreshing Tea, Brew Inner Meditation Tea, Brew Specialty Tea) and give it as a normal unit ability (doesn't level up) to your Panda. At the touch of the icon on your guy, you can then choose brew tea. That way, as soon as you acquire tea leaves, you can make tea instantly. But I don't know, you can make it based off regions and homes.

By the way, you'll want a trigger like this for making a particular tea:

Code:
Wild Tea Leaves
    Events
        Unit - A unit finishes casting an ability
    Conditions
        (Ability being cast) equal to Brew Refreshing Tea
        (Item carried by (Casting unit) of type Wild Tea Leaves) equal to True
    Actions
        Item - Remove (Item carried by (Casting unit) of type Wild Tea Leaves)
        Hero - Create Refreshing Tea and give it to (Entering unit)
        Game - Display to (Owner of (casting unit)): "Brewed Refreshing Tea!"
 
ok, I figured out how to make the trolls... I think.... but how do I make them attack w/o ai?
 
Well obviously you have to make them enemies of the town, which is easy, because it is defaulted that you're an enemy of everyone.

HOWEVER, you can also order said created units as a unit group to attack-move to <violentregion> (obviously you have to create this region in front of the town.

If it is an exquisite map, you will have to create multiple regions that order entering units to attack move to the next region. You can use a unitgroup (several maybe) to make sure that trolls already ordered don't end up going in loops. I can't explain it exactly, but I've realized Unit Groups will dramatically help the situation of moving units, and not even Acehart seems to have submitted something like this :)

...I suggest that you make the brown player, instead of using Neutral Hostile, as the enemy. That way, you can subdue the trolls by then making them allied with you after you, say, kill their leader.
 
ok, I can create the trolls

Code:
Create trolls
    Events
        Time - Every 60.00 seconds of game time
    Conditions
    Actions
        Unit - Create 1 Forest Troll for Player 12 (Brown) at (Center of Troll area <gen>) facing (Position of (Triggering unit))
        Unit - Create 1 Forest Troll for Player 12 (Brown) at (Center of Troll area <gen>) facing (Position of (Triggering unit))
        Unit - Create 1 Forest Troll for Player 12 (Brown) at (Center of Troll area <gen>) facing (Position of (Triggering unit))
        Unit - Create 1 Forest Troll for Player 12 (Brown) at (Center of Troll area <gen>) facing (Position of (Triggering unit))
        Unit - Create 1 Forest Troll for Player 12 (Brown) at (Center of Troll area <gen>) facing (Position of (Triggering unit))

now, I created this trigger to send them to attack

Code:
Trolls Attack Gnolls
    Events
        Unit - A unit enters Troll area <gen>
    Conditions
        ((Last created unit) is in (Units in Troll area <gen>)) Equal to True
        ((Last created unit) is in (Units in Troll area <gen>)) Equal to True
    Actions
        Unit Group - Order (Units in Troll area <gen>) to Move To (Center of Gnoll camp <gen>)

but only three from the first group went to attack, and then, none after that.

so, what am I missing?
 
...... :P

I'm sad to tell you that those triggers are quite sloppy as far as how it should work :)

But don't fret, you can fix them easily.

1) Why do you have 6 create units? You can select the number you create at the spot. See that "1"?

2) There is no need to have any events AT ALL for that trigger. Simply run the trigger after creating the units in trigger 1.

3) Change the order to attack move, not move. Or else you'll find they won't attack those on the way to their destination.

4) Take away the conditions. I don't even fully understand what you thought it might do.
 
...

lol, I suck at trigger making

I write stories. that's my thing. I get a story, I do it.

thanks for the info, mon ami
 
still something wrong. now they don't attack

(sorry if this is annoying anyone, but I really suck at this and want to learn.)

here's the triggers

Code:
Create trolls
    Events
        Time - Every 60.00 seconds of game time
    Conditions
    Actions
        Unit - Create 6 Forest Troll for Player 12 (Brown) at (Center of Troll area <gen>) facing (Position of (Triggering unit))
        Unit - Create 2 Forest Troll Shadow Priest for Player 12 (Brown) at (Center of Shadow Priest area <gen>) facing (Position of (Triggering unit))

Code:
Trolls Attack Gnolls
    Events
    Conditions
    Actions
        Unit Group - Order (Units in Troll area <gen>) to Attack-Move To (Center of Gnoll camp <gen>)
        Unit Group - Order (Units in Shadow Priest area <gen>) to Attack-Move To (Center of (Playable map area))

what did I do wrong THIS time?
 
You have to run the trigger Troll Attacks Gnoll after you create the units in the first trigger.
Trigger - Run Troll Attack Gnoll

But that trigger you are using will pick every unit not only the trolls.


Use this, and skip the trigger -run event above

Event-
Unit enter Troll area
Unit enter Shadow Priest
Condition -
Owner of entering unit equal to Player 12
Action-
Order entering unit to attack-move to (Center of Gnoll camp <gen>)

And also in your first trigger you have the facing (Position of (Triggering unit)) but their is no triggering unit. Your facing will be Defult facing, not a big problem.
 
Nah, this is a better fix, phrexian :)

Just make 1 trigger for this....

Code:
TrollCreation
    Events
        Time - Every 60.00 seconds of game time
    Conditions
    Actions
        Unit - Create 6 Forest Troll for Player 12 (Brown) at (Center of Troll area <gen>) facing (Position of (Triggering unit))
        Unit - Create 2 Forest Troll Shadow Priest for Player 12 (Brown) at (Center of Shadow Priest area <gen>) facing (Position of (Triggering unit))
        Unit Group - Pick every unit in (Units in (Troll area) matching ((Unit-type of (Picked unit)) Equal to Forest Troll)) and do Order (Picked Unit) to Attack-Move To (Center of Gnoll camp <gen>)
        Unit Group - Pick every unit in (Units in (Shadow Priest area) matching ((Unit-type of (Picked unit)) Equal to Forest Troll Shadow Priest)) and do Order (Picked Unit) to Attack-Move To (Center of Gnoll camp <gen>)

And if you feel like being technical and making sure that you ONLY order all of the units to attack move to blah...there are other units running over the spawning region (perhaps when mr. Panda is raiding the hideout leading some extra units with him and sees them ordered to attack move elsewhere, due to being in the region at the time), you can use unit groups.

Code:
TrollCreation
    Events
        Time - Every 60.00 seconds of game time
    Conditions
    Actions
        Unit - Create 6 Forest Troll for Player 12 (Brown) at (Center of Troll area <gen>) facing (Position of (Triggering unit))
        Unit Group - Add all units of (Last created unit group) to ForestTrollBand1
        Unit - Create 2 Forest Troll Shadow Priest for Player 12 (Brown) at (Center of Shadow Priest area <gen>) facing (Position of (Triggering unit))
        Unit Group - Add all units of (Last created unit group) to ForestTrollSPBand1
        Unit Group - Pick every unit in ForestTrollBand1 and do Order (Picked Unit) to Attack-Move To (Center of Gnoll camp <gen>)
        Unit Group - Pick every unit in ForestTrollSPBand1 and do Order (Picked Unit) to Attack-Move To (Center of Gnoll camp <gen>)

Now the only problem here is that everyone IN the group will be reordered to attack-move if they didn't reach their destination. SO, you might want to create a region just outside the Troll base and do this:

Code:
TrollOutOfSpawn
    Events
        Unit - A unit enters <The Region I told you to make>
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Unit-type of (Triggering unit)) Equal to Forest Troll
                (Unit-type of (Triggering unit)) Equal to Forest Troll Shadow Priest
    Actions
        Unit Group - Remove (Triggering unit) from ForestTrollBand1
        Unit Group - Remove (Triggering unit) from ForestTrollSPBand1

And obviously nothing occurs if the unit in question was never IN the band or was and was removed. The game shouldn't complain. But if you want to be safe, have a boolean of (triggering unit) is in ForestTrollBand1 OR (use another Or loop like the one above) (triggering unit) is in ForestTrollSPBand1, so that the game doesn't waste its time removing the units from the group when they aren't even in it. Won't reduce lag at all though, unless you have 100s of trolls traversing the map.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Real users can't really disable Javascript anymore these days.
  • Ghan Ghan:
    The internet is broken without it.
  • Ghan Ghan:
    Bot readable, not human usable.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    Check out the new Featured Content feature we apparently got with the forum software upgrade! https://www.thehelper.net/featured/
  • The Helper The Helper:
    Also on the bottom right side bar we now have a Trending Content Box!
    +1
  • The Helper The Helper:
    Not on the Headline News page just on the Forums page can we get that Featured and Trending on the home page?
  • Ghan Ghan:
    Since the home page is technically a forum, it now shows on all forum views. Still in the sidebar.
    +1
  • The Helper The Helper:
    Happy Friday! Hope everyone has a fantastic day and an even better weekend!
  • The Helper The Helper:
    Happy Sunday!
  • The Helper The Helper:
    I lovc that I can post webp and X links now! :)
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1

The Helper Discord

Staff online

Members online

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top