HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

hmmm RPG trigger stumper

08-27-2003, 09:49 PM#1
jeffsu
So I'm working on an RPG in which 4 players are the "good guys" and do standard RPG type stuff, and 1 player is a villain -- hunting the other 4 and adding some danger and unpredictability to the bad guys.

I have come upon a problem though -- I want to make sure that the villain hero can't cheat by killing his own units and allied units to screw up the quests. One way I've thought of is a "unit is attacked" trigger and check if it's him, but that would result in a huge number of trigger executions and cause lag over time. Can anyone think of another way I could prevent this potential cheating?
08-27-2003, 09:54 PM#2
Zachary_Shadow
Make important NPC's Invulnerable from game start. This will keep people from doing stupid stuff.

Also people in towns and such could be "safe" from danger.
08-27-2003, 09:57 PM#3
jeffsu
The town NPCs are already invulnerable -- I'm concerned with killable units, for example one quest involves slaying a guardian hydra to get a key. I want to make sure that the evil hero can't kill the hydra (even though he's allied with it) to take the key and/or rob the good heros of experience.
08-27-2003, 10:05 PM#4
35263526
Make it invunerable, then make it so when the heros come within range (say 300) of it, it become vunerable. And make another tigger making it that when they leave range, it becomes invunerable. If the villain comes when the heros r fighting it, he can screw it up, but u have to accept that sometimes people ar dickheads.

Why not do something funny like turn the villian into a sheep when he attacks a main character. That way, it wont lag caus he cant do it again.
08-27-2003, 10:08 PM#5
Progniss
how about if
e - Generic Unit - Is attacked
c -
a - If / Then / Else (Multiple)
- Condition - Evil hero is attacking unit
- Action Move hero instantly to "place where he starts"
- Action Set attacked units health to 100%
- Else Do Nothing
08-27-2003, 10:09 PM#6
Zachary_Shadow
Another way to do it:

Have spots for your "special monsters" Caves, houses, the like.

Then do a region outside (and inside)

Set up a trigger, saying:
Event: Unit enters region
Cond: unit must be of Group (Players)
Action: Instantly move unit to region

Boom, u have a safe place for your hydra in a cave, where only the players (good guys) can enter. This way it's still very cool, and you don't have to worry about him fubaring the whole thing :)
08-27-2003, 10:21 PM#7
jeffsu
Weird...thought I posted another reply here but I don't see it, heh.

Anyway, thanks guys for the ideas and the input! I really appreciate it! I think I can get at least one of those ideas to work. I think I'm leaning towards the vuln/invuln idea. The generic "unit is attacked" is out because LOTS of units get attacked and that could get laggy.
08-27-2003, 10:48 PM#8
jeffsu
So I went and started testing some of this and ran into a problem: I see the "unit within range" event but there isn't one for when it leaves. So, I'm stuck at making the unit vulnerable when the good guys come to attack it, but how to turn it invulnerable again? I considered a timer, but that could expire while the heros were still there...no good.
08-28-2003, 01:51 AM#9
Vraq
Another option you may consider is a trigger that teleports the evil Hero to the other side of the map if it attacks the monster or casts an offensive spell at it.

Personally, I'd be leery of using invuln if the evil Hero is around or he can harrass the good guys by turning quest monsters invulnerable. Same with triggers setting the monsters' health back to 100% if the evil Hero attacks them. He could attack the monster just before the good guys have slain it... Just to annoy them and/or get them killed by a suddenly 100% monster.
08-28-2003, 01:58 AM#10
Zachary_Shadow
Id go for the safe way: Cave/buildings seperate from the "game" so that only the good guys can get in there...easiest and fastest way to do it.
08-28-2003, 02:05 AM#11
junithorn !
Um you really dont have to move him, tahts just a hassle, just use order unit to stop if he attacks.
08-28-2003, 05:20 AM#12
Raptor--
you don't have to worry about 'is attacked' firing too many times, since you can use the SPECIFIC UNIT event, and set the unit to the boss, therefore it will only run when the boss is attacked

'unitXYZ is attacked', attacking unit == villain, stop attacking unit and possibly bonk him on the head with a giant falling rock
08-28-2003, 07:18 AM#13
jeffsu
Yeah, I had originally been thinking of protecting all allied units, but now that you mention it just protecting the bosses with the specific unit event should be sufficient. Afterall, if the evil hero spends all game taking out armies of his own troops, he's gonna be so weak he'll lose anyway.

Thanks for all the input everyone -- I'm overwhelmed! 8)
08-28-2003, 07:19 AM#14
Locotaur
Just use a unit owned by whatever player is attacked. It won't cause any lag, I made an rpg that was loaded with a bunch of them, and bunch of 5-30 second periodic triggers and it ran fine.
08-28-2003, 12:45 PM#15
xXL33t-DragonXx
Or do it the easy way....

Event:
A unit is issued an order with a target
Condition:
Order String Comparison: "Attack"
Unit is owned by (owner of triggering unit)
Action:
Issued order to (triggering unit) with no point or object to "stop"

So everytime he tries to attack his own units he just stops. Add in some text that says "Can not attack your own units" that might help.