Assistance/or pointers with a few projects requested

  • Kastil
  • Kastil's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 week 3 days ago #6747 by Kastil
Kastil created the topic: Assistance/or pointers with a few projects requested
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.
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.

  • Kastil
  • Kastil's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 week 3 days ago #6748 by Kastil
Kastil replied the topic: Assistance/or pointers with a few projects requested 'Is it possible?'
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
1 week 2 days ago #6749 by Parnassus
Parnassus replied the topic: Assistance/or pointers with a few projects requested 'Is it possible?'
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
1 week 2 days ago - 1 week 2 days ago #6754 by thomas
thomas replied the topic: Assistance/or pointers with a few projects requested 'Is it possible?'
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: 1 week 2 days ago 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
1 week 2 days ago #6757 by Parnassus
Parnassus replied the topic: Assistance/or pointers with a few projects requested
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.

  • Kastil
  • Kastil's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 week 1 day ago - 1 week 1 day ago #6760 by Kastil
Kastil replied the 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: 1 week 1 day ago by Kastil.

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

More
1 week 1 day ago #6761 by thomas
thomas replied the topic: Things to think about
Ok, given your specific need, it _should_ work with the act trigger (numeric arg = 0, arg = utters the words).

I think the comma in that arg list is what messes it up. It seems the is_substring() function is particular about punctuation (ie. does not want it in the string to check).

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

Time to create page: 1.160 seconds