Welcome to the Builder Academy

Question Assistance/or pointers with a few projects requested

More
19 May 2017 13:11 #6747 by Kastil
Working on a few triggers that are providing a variety of difficulties to me. Any assistance (look at #) whatever would be appreciated.
Not sure if I should list them separately or not so will do them all here. Edit after starting the first have opted to list them separately.
1. Goal - a mob reacts to someone casting any spell in the room with it not just directed at said mob.
Code:
Trigger Intended Assignment: Mobiles Trigger Type: Act , Numeric Arg: 0, Arg list: utters the words, Commands: say I heard that! if %self.fighting% if %actor.is_pc% wait 1 sec %echoaround% %actor% %self% @Rslaps@n %actor%! %send% %actor% %self% @Rslaps@n you! say Stop that! end else emote looks about nervously. end

I've tried the following-
Trigger Type: Act , Numeric Arg: 0, Arg list: utters the words, (mob only reacts if emote used, but not casting)
Trigger Type: Speech , Numeric Arg: 100, Arg list: utters the words, (mob reacts to say, but not casting)
Trigger Type: Cast , Numeric Arg: 100, Arg list: (nothing happens)
As I read Cast, it says that the Cast trigger is activated if a spell is cast at the mob, I'm looking for some way that the mob
will react to those pansy healers not fighting, but just standing back healing and/or buffing. I did not cast any spells directly at the mob as I'm looking for more than just that.

Thanks for any input.
Kastil

Please Log in or Create an account to join the conversation.

More
19 May 2017 13:26 #6748 by Kastil
Two items I'm trying to figure out that might not be something that can be done with triggers.

1. Would like to give mobs the ability to switch targets during combat. Meaning a random(or specific) chance to change the target it is currently fighting. I have no idea how to even start on this one.

2. Is it possible to have a trigger on an object that can change the Room Flags and Sector Type fields of the room its in. Example a campfire (that is loaded when made) changes the room its created in to a sector with light example forest to indoors and
additionally would remove other flags that obstruct vision like dark or fog. But when the fire dies out it would return the room to its previous state? Or is it best to have the Coder create an illuminated flag for objects (that does have to be held or handled like torches)?

I'll stop spamming the boards now, hopefully can get back to building.
Kastil

Please Log in or Create an account to join the conversation.

More
20 May 2017 13:57 #6749 by Parnassus
To start, I don't consider your posts as spamming. They are all interesting and well phrased questions. However, I'd suggest putting each question in its own topic with a meaningful title in the future. This makes it easier to find for people asking the same question in the future.

First post: I have no answer on this one. I do have the feeling, however, that if your mob is already fighting, you may have problems getting it to react to things if you have any fighting triggers on it. If the mob is sentinel (non-moving) you may want to check room triggers instead. If there are no fighting triggers in effect, this may not be a problem.

Second post:
1. Check this post.
2. This one is a lot harder. I know this sounds egotistical but you might log into TBA's buildport and check out my Valen Park. I think it's zone 560. Make sure to turn off your nohassle is off. Since the zone is pretty much made of triggers, having nohassle on will show you a bunch of error messages but not much interesting. The things I would suggest you look for are the transitions between day and night (these are basically a trick) and the swanride which uses a trigger to make it seem like the room looks like something different. The base of this trigger was written for me by Fizban and I have to say it's one of the most amazing things I've ever seen. Ride the swan (only in daytime) and try a few things like sitting on the bench or floor or lying down. It's even more fun if you do it with a friend :)
The following user(s) said Thank You: Kastil

Please Log in or Create an account to join the conversation.

More
20 May 2017 23:59 - 21 May 2017 00:00 #6754 by thomas
Your first point is interesting, and it can be done in code. Doing it in triggers will probably be difficult, though.

First off, you would need to define which spells a monster would react to - ANY spells cast on someone currently hitting the monster? Just heals and buffs? What about the strength of those spells, does that factor in?

As you probably are guessing by now, you'd need some sort of threat system. You will need to answer questions like these:
"If I (as a mob) am in the process of fighting this warrior, and a cleric starts healing him, do my priorities shift?"
"If I am in the process of fighting this warrior and a wizard or cleric casts a spell at me, will I try to switch targets?"
"If I switch targets, is it possible for the players to make me switch back?"
"If I fight a warrior, is it possible he will capture my attention in a way that prevents me from changing my target?"
"If I am faced with a summoned opponent (skeleton, zombie), will they be able to hold my attention?"
"If I can sense that I am very close to killing my current target, will I still switch targets, even to someone unhurt?"

This is not easy, and requires quite a bit of thought before coding a single line. You will need to contemplate it before we can help you in any meaningful way.
Last edit: 21 May 2017 00:00 by thomas. Reason: more questions to think about
The following user(s) said Thank You: Kastil

Please Log in or Create an account to join the conversation.

More
21 May 2017 01:25 #6757 by Parnassus
Ha, I somehow missed that you were already using loops to target all the people in the room. The only difference is that you decide what to check for (Is the person already fighting? Is the person already fighting you? Is the person not the person that you're currently targeting? and so on) and if the random target fits the criteria, you stop the trigger.
The following user(s) said Thank You: Kastil

Please Log in or Create an account to join the conversation.

More
21 May 2017 13:20 - 21 May 2017 13:27 #6760 by Kastil
Replied by Kastil on topic Things to think about
Thank you for your feedback. I'm just a builder I don't code so the coding way is not an option for me (my Imp prefers triggers to actual code... shrug) I like that you really dissected the issue. To further define what I'm trying to do

"If I (as the mob) am in the process of fighting and someone in the group I am fighting cast's a spell (not concerned what type) I'd like the option to reach out and smack them for it.

I'm not concerned with types of spells are cast, healing, buffs etc.. or even if the caster is already tanking, the affect would be something extra and unresisted, like my other combat type triggers. It's looking like it might be an impractical idea, sense there appears to be no way to actually trigger it under the circumstances I'm aiming for. Thanks though, I do have a better idea of how to approach concepts like this.
Last edit: 21 May 2017 13:27 by Kastil.

Please Log in or Create an account to join the conversation.

Time to create page: 0.189 seconds