Welcome to the Builder Academy

Question Teleport Certain Players in Room (Object) [Request]

More
01 Jul 2015 21:57 #5363 by Kay
Could I get some help please.

Interested in having an trigger/item(which must be held) that when used will teleport every single player of a certain race in the room to another room. Once it has done this the item will then destroy(purge) itself.

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

More
02 Jul 2015 00:45 #5365 by Parnassus
You've asked something that seems really complicated to me and I don't know your level of experience so some of what I say will seem too easy and some will seem too hard, probably.

Choose what will trigger the action:
help obj-trig-types

From there, check the trigger type to see if held can be specified, such as:
help trigedit-obj-command

Then you need to create a loop to check each player in the room for the characteristic you're looking for. I usually use the decapitating rabbit trigger for this:
tstat 1398 (Random Rabbit Decapitates Mobs - M1307)
However, this is really dealing with mobs, not players. You may prefer this one:
tstat 24 (Room While Teleport Example)

Next: Basic TBA does not have races so there isn't a way to check that. If your mud has implemented races, check to see if they've also implemented a way to check.
help char-var
help race
Insert your check into the loop so your trigger only affects the ones that meet your criteria.

Finally, the purge. The rabbit purges itself so there's an example. Also read:
help %purge%
Remember that when you purge the object that has the trigger, you need to have the purge at the end because any following commands can't be done when the trigger no longer exists.


I hope this info helps you.

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

More
02 Jul 2015 14:44 - 02 Jul 2015 14:47 #5367 by Kay

Parnassus wrote: You've asked something that seems really complicated to me and I don't know your level of experience so some of what I say will seem too easy and some will seem too hard, probably.

I hope this info helps you.



The basic(very basic one, mind you) are ones based on examples. The major issue I'm having is that I can't find any examples of loops that are activated with commands



Does not activate at all

and is based more or less on the examples you gave plus this example on the forums

* a small script to make a bomb go off three seconds after it's dropped.
set room_var %actor.room%
* Send a message when the bomb goes off.
wait 3 s
%echo% The Grenade blasts into smithereens, striking everyone here.
* Target the first char
set target_char %room_var.people%
* Do stuff
while %target_char%
* Set the next target before this one perhaps dies.
set tmp_target %target_char.next_in_room%
* This is where the good/bad things are supposed to happen.
%send% %target_char% The explosion hurts you.
%damage% %target_char% 30
* Find next target
set target_char %tmp_target%
* Loop back
done



the trigger was made to target males and not a specific race. Hopefully means I can get help
Last edit: 02 Jul 2015 14:47 by Kay.

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

More
02 Jul 2015 21:12 #5370 by thomas
what does the "top" of the trigger say?
The arguments matter.

tstat 102 or 131 functioning triggers that listens for commands.

About the the (%target.sex% == Male) -check. The %actor.sex% returns either male, female or neutral. The case matters in == checks.

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

More
02 Jul 2015 23:25 - 02 Jul 2015 23:26 #5373 by Kay

thomas wrote: what does the "top" of the trigger say?
The arguments matter.

tstat 102 or 131 functioning triggers that listens for commands.

About the the (%target.sex% == Male) -check. The %actor.sex% returns either male, female or neutral. The case matters in == checks.


male case changed, thanks for that. Won't forget.

Last edit: 02 Jul 2015 23:26 by Kay.

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

More
02 Jul 2015 23:56 #5376 by Parnassus
You missed this step:

Parnassus wrote: From there, check the trigger type to see if held can be specified, such as:
help trigedit-obj-command


Numeric Arg : a bitfield to indicate where the object must be in order to cause the trigger to activate.
Bits:
1: In character's worn equipment.
2: In character's carried inventory.
4: In same room with the character.

These bits can be set at once by adding the values.
7= worn, inv, room. 3 = worn, inv. 5 = worn, room.

You've pretty much told it that the object can't be carried, worn or in the same room.
The following user(s) said Thank You: Kay

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

Time to create page: 0.226 seconds