Staredit Network

Staredit Network -> UMS Assistance -> Shops Enter-Exit System(s).
Report, edit, etc...Posted by Shadow on 2005-07-22 at 14:35:00
Well, I am mkaing these triggers for my RPG(Eternal Life RPG). I am not sure why these aren't working. But, maybe someone here can help me out! I'll list all of the triggers here:

Cond:
Deaths(P1, Exactly, 0, Market );
Switch(Switch 1, Set);
Bring(P4, AtLeast, 1, [ Market ], P1);
Bring(P1, AtLeast, 1, Men, P1);

Actions:
Comment("01");
SetDeaths(P1, SetTo, 1, Market );
SetSwitch(Switch 1, Clear);
Wait(200);
MoveUnit(All, Men, P1, World, Enter----Exit Market);
Order(Men, P1, Enter----Exit Market, Move, Counter----Market);
CenterView(Enter----Exit Market);
PreserveTrigger();


Those triggers ^ are to enter the shop. These ones are to leave the shop \/

Cond:
Deaths(P1, Exactly, 1, [ Market ]);
Switch(Switch 1, Clear);
Bring(P1, AtLeast, 1, Men, Enter----Exit Market);

Actions:
Comment("02");
SetDeaths(P1, SetTo, 0, [ Market ]);
SetSwitch(Switch 1, Set);
Wait(200);
MoveUnit(All, Men, P1, Enter----Exit Market, P1);
CenterView(P1);
PreserveTrigger();

Those are the triggers. If you are able to explain what I did wrong, I would be thankful. The reason I have "explain" all bold is so I KNOW what to do, that way I am able to LEARN! Thanks for the help in advance bleh.gif!
Report, edit, etc...Posted by roule on 2005-07-22 at 14:38:46
You put in both the same condition exept inn-market, in result that when P4 bring 1 men to "market" the P1 units move between the 2. I think its this, but im unsure.
Report, edit, etc...Posted by Shadow on 2005-07-22 at 14:43:26
ermm.gif What? That mde no sense to me... Can you try and elaborate some more?

Is english your second language?
Report, edit, etc...Posted by roule on 2005-07-22 at 14:46:06
Conditions:
Deaths of "Market" = 0
Switch 1 Set
P4 Brings 1 Market to "P1"
P! Brings at least 1 Men to World

Actions:

SetDeaths to 1 for "Market" for P1
Clear Switch 1
Wait 200
Move all men for P1 at "World" to "Enter Market"
Order Men owned by P1 to move to "Counter----Market"
CenterView @ "Counter"
PreserveTrigger();

Conditions:
Deaths of "Inn" = 0
Switch 1 Set
P4 Brings 1 Market to "P1"
P1 Brings at least 1 Men to World

Actions:

SetDeaths to 1 for "Inn" for P1
Clear Switch 1
Wait 200
Move all men for P1 at "World" to "Enter Inn"
Order Men owned by P1 to move to "Counter----Inn"
CenterView @ "Counter"
PreserveTrigger();

Conditions:
P1 Brings at least 1 men to "world"

Action:
Switch 1 Set
PreserveTrigger();

Yes, english is my second language, but i have something im sure you will understand: the 2 triggers interfer with eachothers
Report, edit, etc...Posted by Shadow on 2005-07-22 at 14:53:06
Oops... The second part is not supposed to be like that. That was my fault in posting the triggers. These are the triggers in SF form. So, I hope you'll be able to read them.

**Note: These are all of the triggers:

Cond:
Deaths(P1, Exactly, 0, Market );
Switch(Switch 1, Set);
Bring(P4, AtLeast, 1, [ Market ], P1);
Bring(P1, AtLeast, 1, Men, P1);

Actions:
Comment("01");
SetDeaths(P1, SetTo, 1, Market );
SetSwitch(Switch 1, Clear);
Wait(200);
MoveUnit(All, Men, P1, World, Enter----Exit Market);
Order(Men, P1, Enter----Exit Market, Move, Counter----Market);
CenterView(Enter----Exit Market);
PreserveTrigger();


Those triggers ^ are to enter the shop. These ones are to leave the shop \/

Cond:
Deaths(P1, Exactly, 1, [ Market ]);
Switch(Switch 1, Clear);
Bring(P1, AtLeast, 1, Men, Enter----Exit Market);

Actions:
Comment("02");
SetDeaths(P1, SetTo, 0, [ Market ]);
SetSwitch(Switch 1, Set);
Wait(200);
MoveUnit(All, Men, P1, Enter----Exit Market, P1);
CenterView(P1);
PreserveTrigger();

When Switch 1 is set, the location is centered on the hero. (Forgot to mention that).
Report, edit, etc...Posted by UED77 on 2005-07-22 at 15:08:25
EDIT: Now updated to reflect info in the above post.

Well, could you explain how these are not working? Which actions don't execute?
Are you sure all of the conditions are satisfied for trigger execution?
Are you sure that the player these triggers are owned by has a start location?

Scanning this over, I could not see a mistake, and that is why I am asking these questions. Details and more testing would be needed.

Try experimenting, as I cannot, at this stage, point out an exact site of error.
If it still doesn't want to work, and you've answered these guiding questions of mine, post the map, or PM it to me.

UED77
Report, edit, etc...Posted by Shadow on 2005-07-22 at 15:24:55

Alrighty... Time to get messy.

This is what I would like to do:

Player 1 walks up to the "Market". Since all of the market's are "active" buildings, I would like the player's herp to be transported to the "Market". So, now I'll try and explain the triggers in sentences, for both of us! tongue.gif

When the Deaths = 0 and switch 1 is set, there is nothing happening in the "buildings". Which means that the hero is out exploring the world. But, when P1 walks up the biulding owned by P4, it recognizes that:
•Deaths = 1
•Switch 1 is set
•P1 has one unit at "P1" location
•P4 has brought the "building" to "P1"

So, then the actions should take place.
The deaths will be set to 1 and the next switch is cleared. The hero waits a little bit and gets moved to the "inside" of the "building".

Now to leave the building:
•The Deaths now = 1
•Switch 1 is cleared
•P1 Brings 0 men to world
•P1 brings a unit to "Leave"

So, the actions should take place:
The deaths get set back to 0.
The switch is set.
And the hero is moved back to P1.

(When Switch 1 is set, "P1" location is centered on the hero. When it is cleared, location "P1" is supposed to stay at the building while the hero get's moved.)
Report, edit, etc...Posted by UED77 on 2005-07-22 at 16:07:39
Thanks, but you just restated the Starforge-format triggers in plain English. I figured this much out already. What about the questions I originally asked you?

UED77
Report, edit, etc...Posted by l)ark_13 on 2005-07-22 at 16:12:56
Is Switch 1 and Deaths already set at 1? Maybe you should reverse it, so that when you enter the deaths and switch get set to 1 and 'set', and when you leave the deaths and switch get set to 0 and 'cleared'.
Report, edit, etc...Posted by Shadow on 2005-07-22 at 16:16:01
QUOTE
Well, could you explain how these are not working? Which actions don't execute?

None og the actions execute. I go up to the "Market", and when I am supposed to be moved to the shop, nothing happens.
QUOTE
Are you sure all of the conditions are satisfied for trigger execution?

I am around 90% sure that the conditions are being fulfilled.
QUOTE
Are you sure that the player these triggers are owned by has a start location?

Positive.
Report, edit, etc...Posted by l)ark_13 on 2005-07-22 at 16:40:08
Well then, you haven't set the deaths of the unit to 1 and you haven't actually set the switch to "SET". Make a trigger like:

-Always

-Set deaths to 1
-Set switch1

There, that will probably work.
Report, edit, etc...Posted by Shadow on 2005-07-23 at 00:06:13
Well, now I'm having a problem... I fixed what was wrong with the first triggers. But, now, I am having a trouble with exiting. I'm not sure what I should do. Here is the problem:

When I exit the shop, I keep getting sent back to it. Because, technically I am still bringing the Building to "P1" location. So, I was wondering if you have an idea for what I should do about this. I am really confused!
Report, edit, etc...Posted by roule on 2005-07-23 at 08:55:40
Just move the building using the "move" trigger.
Report, edit, etc...Posted by Forsaken on 2005-07-23 at 11:30:21
Roule, what would that do? That would then make it look like the building disapeared.

@ Shadow, I'll do some testing and see waht I can come up with. When I figure it out, I'll let you know. Maybe... I leave tonight, and I have work today. So, maybe someone else will help you out before I do! bleh.gif
Report, edit, etc...Posted by Moogle on 2005-07-23 at 12:25:04
Don't know if this will help or not but this way i do entering / exiting off a hero going to building and teleports you to a room.

Condition:
- Player 7 brings excatly 1 Market (Armory) to Hero Location
- Current Player has suffered 0 Deaths of Market (Armory)

Actions:
- Modify Death counts for current player: 1 Market (Armory)
- Move Unit at Hero Location to Market Place
- Preserve Trigger

When he not at Market Place location i just add another Trigger like so;

Condition:
- Current player brings 0 units to Market Place

Actions:
- Modify Death counts for current player: 0 Market (Armory)
- Preserve Trigger

Pretty simple i guess but works. Im sure other ways do it but this way i do it. Uh if you want trigger in Starforge mode well i dunno how do it then.

\\Moogle
Report, edit, etc...Posted by PCFredZ on 2005-07-23 at 12:38:23
QUOTE(Shadow @ Jul 22 2005, 02:35 PM)
Cond:
Deaths(P1, Exactly, 0, Market );
Switch(Switch 1, Set);

Bring(P4, AtLeast, 1, [ Market ], P1);
Bring(P1, AtLeast, 1, Men, P1);

Actions:
Comment("01");
SetDeaths(P1, SetTo, 1, Market );
SetSwitch(Switch 1, Clear);

Wait(200);
MoveUnit(All, Men, P1, World, Enter----Exit Market);
Order(Men, P1, Enter----Exit Market, Move, Counter----Market);
CenterView(Enter----Exit Market);
PreserveTrigger();
Those triggers ^ are to enter the shop. These ones are to leave the shop \/

Cond:
Deaths(P1, Exactly, 1, [ Market ]);
Switch(Switch 1, Clear);

Bring(P1, AtLeast, 1, Men, Enter----Exit Market);

Actions:
Comment("02");
SetDeaths(P1, SetTo, 0, [ Market ]);
SetSwitch(Switch 1, Set);

Wait(200);
MoveUnit(All, Men, P1, Enter----Exit Market, P1);
CenterView(P1);
PreserveTrigger();
[right][snapback]267847[/snapback][/right]

Red: redundancy. Unless if you're trying to make it so that only 1 player may be in the market at the same time, the Death and Switch condition/actions are doing the same thing. Take out the Switch, since Deaths are easier to work with.
Yellow: interference. The Exit trigger would be run immediately after the Enter trigger executes because the Order action of the Enter trigger does not allow the unit to be moved away from the Enter----Exit Market location fast enough for the Exit trigger to run and see that the conditions are met. To fix this, simply delete the two Deaths/Switches actions from the Enter trigger, and add a new trigger as follows:

Cond:
bring(p1, atleast, 1, men, counter----market);

Actions:
setdeaths(p1, setto, 1, market);
preservetrigger();
Report, edit, etc...Posted by l)ark_13 on 2005-07-24 at 00:44:32
You've probably had a lot of help and have discovered by now how to solve your problem, but a really easy way to do this, with minimal triggers/actions/conditions is:

When you enter, just make it so when the player that owns the bulding brings the building to the human player's location (centered around the the player), the player enters the building.

For exiting, place burrowed units, such as hydralisks, for unused players (such as P9-12) around the buildings. Assosiate a player with a building (P9 = shop1, P10 = shop 2, etc...); you have at least 4 potential buildings to enter. When you exit a building, center a location around the burrowed unit's player associated with the building, then move the player to that location.
Make sure the burrowed units are far enough away from the building so you dont re-enter when you exit, as you stated above.

This is extremely easy to accomplish, and very simple.
Report, edit, etc...Posted by PCFredZ on 2005-07-24 at 09:36:49
QUOTE(l)ark_13 @ Jul 24 2005, 12:44 AM)
You've probably had a lot of help and have discovered by now how to solve your problem, but a really easy way to do this, with minimal triggers/actions/conditions is:

When you enter, just make it so when the player that owns the bulding brings the building to the human player's location (centered around the the player), the player enters the building.

For exiting, place burrowed units, such as hydralisks, for unused players (such as P9-12) around the buildings.  Assosiate a player with a building (P9 = shop1, P10 = shop 2, etc...); you have at least 4 potential buildings to enter.  When you exit a building, center a location around the burrowed unit's player associated with the building, then move the player to that location. 
Make sure the burrowed units are far enough away from the building so you dont re-enter when you exit, as you stated above.

This is extremely easy to accomplish, and very simple.
[right][snapback]268937[/snapback][/right]

Nah, if you do it that way, the buildings will have to stay static.

Instead, just make 2 locations center around the hero, 1x1 each, called "Shop" and "World". When the player enters a building, "World" stops following him. "Shop" continues to follow him for the other stuff as needed. At exiting, the hero should be moved to "World". Voila, you can now enter any new buildings built.

My unfinished World of Starcraft 2 used pretty much the same system as you're trying, except that it does not have a Shop location centering on the player, because I think using the old Beacon Selection system is more efficient in the In-Building stuff. Note that it is protected, but you can use Trigger Viewer to see the triggers.
Report, edit, etc...Posted by l)ark_13 on 2005-07-24 at 17:56:02
QUOTE(PCFredZ @ Jul 24 2005, 06:36 AM)
Nah, if you do it that way, the buildings will have to stay static.


I dont expect them to get up and run away tongue.gif Its good if the buildings dont move, because they can still be destroyed and then be left useless. Also, because its not a carnival, they wont move and you wont have to try and find them if they did.

I can understand you using your system because I'm assuming you can create buildings and shops in your World of Starcraft.
Report, edit, etc...Posted by Sniper on 2005-07-24 at 18:13:37
Ok, I'm not sure I'm understanding what you want here. But from what I'm seeing, you want to enter/leave a building, but your making things 10x more complicated then it needs to be. You'll need 4 locations. The actual Entrance, where you appear after you enter, the actual exit, and where you'll appear after you exit.

Condition:
Bring(current player,atleast,1,anyunit,market entrance 1);

Action:
Move(anyunit,current player, market entrance 1, market entrance 2);
centerview(market entrance 2);
Preservetrigger();
comment("market entrance 1");

2nd trigger

Condition:
Bring(current player,atleast,1,anyunit,market exit 1);

Action:
Move(anyunit,current player, market exit 1,market exit 2);
centerview(market exit 2);
PreserveTrigger();
comment("market exit 1");
Report, edit, etc...Posted by PCFredZ on 2005-07-24 at 20:51:01
QUOTE(Mp)Sniper @ Jul 24 2005, 06:13 PM)
Ok, I'm not sure I'm understanding what you want here. But from what I'm seeing, you want to enter/leave a building, but your making things 10x more complicated then it needs to be. You'll need 4 locations. The actual Entrance, where you appear after you enter, the actual exit, and where you'll appear after you exit.
[right][snapback]269464[/snapback][/right]

No, he's using a different approach.
Report, edit, etc...Posted by Urmom(U) on 2005-07-24 at 21:03:41
QUOTE(PCFredZ @ Jul 24 2005, 09:36 AM)
Nah, if you do it that way, the buildings will have to stay static.

Instead, just make 2 locations center around the hero, 1x1 each, called "Shop" and "World". When the player enters a building, "World" stops following him. "Shop" continues to follow him for the other stuff as needed. At exiting, the hero should be moved to "World". Voila, you can now enter any new buildings built.

My unfinished World of Starcraft 2 used pretty much the same system as you're trying, except that it does not have a Shop location centering on the player, because I think using the old Beacon Selection system is more efficient in the In-Building stuff. Note that it is protected, but you can use Trigger Viewer to see the triggers.
[right][snapback]269083[/snapback][/right]


that is the correct way to do it
and sniper, that would do nothing...
Next Page (1)