Triggers...explained

Make suggestions for improving one of the best games on the net!
Post Reply
Inferno
Private First Class
Private First Class
Posts: 91
Joined: Sat Jan 22, 2005 6:52 pm
Contact:

Triggers...explained

Post by Inferno » Fri Mar 17, 2006 1:12 am

My idea is very basic "triggers" but I'll explain it. Let's say you wanted to make a CTF map, like the way you play it in real life. If you get caught (shot) on the other teams side you spawn in jail that has a non-drivethrough mesh. Someone is going to "save" his teamate so he shoots a flashying red button next to the door and it turns drivethrough, once a tank hits a certain spot on the ground or in the air it instantly goes back to non-drivethrough. and the players now have to run back to their side, or try CTF.


I guess that may be complex, but if you could support bullet detection on mesh, tank touching mesh, and where the tank dies...I'd greatly apreciate it. On the effect side, I'd like to be able to turn any number of meshes or groups drivethrough or shootthrough.

*Inferno is thanking of lots of awesome ideas using these triggers!!!*

I hope you can do this,
Inferno

User avatar
L4m3r
Hater of Everything
Hater of Everything
Posts: 724
Joined: Tue Feb 08, 2005 5:15 am
Location: Los Angeles

Post by L4m3r » Fri Mar 17, 2006 1:56 am

Sounds like something better done via a plugin. you can pull the position from a death event and alter the spawn position later if needed. That would work for jailing, at least.

You can't make something drivethrough and then not drivethrough; AFAIK the only way to make "gates" is with world weapons.

There is no way to open the gates with shots, but it could be done by the tank being in a certain place or having a certain flag (this is actually a use for the Useless flag :p)

Definitely an interesting idea. A lot of possible variations... worth playing with.

Regardless, this sort of trigger is more akin to programming than mapping, and should probably stay in the plugin realm of things. the map code would be insanely complicated.
Optimism is just a milder alternative to denial.

Theme97
Private First Class
Private First Class
Posts: 221
Joined: Fri Nov 11, 2005 8:04 pm
Contact:

Post by Theme97 » Fri Mar 17, 2006 2:17 am

I've got something close enough. Instead of a shot trigger it's a zone trigger. This should be in development.

Code: Select all

bz_eZoneEntryEvent  A player enters a zone ( not implemented )
bz_eZoneExitEvent  A player exits a zone ( not implemented )
From the API docs. :D

I agree with L4m3r, this should stay in the plugin realm. We wouldn't want maps getting more complicated than they already are! :|
Image

Inferno
Private First Class
Private First Class
Posts: 91
Joined: Sat Jan 22, 2005 6:52 pm
Contact:

Post by Inferno » Fri Mar 17, 2006 2:30 am

plugins can't change map data :? I don't want a bunch of freakin world weapons either...I pretty much explained a simple idea I think can be implemented easily as an extension to map options, not everyone needs to know about it ;)

User avatar
tw1sted
Private First Class
Private First Class
Posts: 849
Joined: Tue Feb 21, 2006 10:21 pm

Post by tw1sted » Fri Mar 17, 2006 2:30 am

yea i can see how its more of a plugin instead of enhancments. but have fun trying to get that to work!!!

Theme97
Private First Class
Private First Class
Posts: 221
Joined: Fri Nov 11, 2005 8:04 pm
Contact:

Re: Triggers...explained

Post by Theme97 » Fri Mar 17, 2006 2:41 am

Inferno wrote:My idea is very basic "triggers" but I'll explain it. Let's say you wanted to make a CTF map, like the way you play it in real life. If you get caught (shot) on the other teams side you spawn in jail that has a non-drivethrough mesh.
Ok, but how bout a couple of semi-transparent meshbox walls? :D
Inferno wrote:Someone is going to "save" his teamate so he shoots a flashying red button next to the door and it turns drivethrough, once a tank hits a certain spot on the ground or in the air it instantly goes back to non-drivethrough.
So you'd need something to detect it and something else for the mesh / meshbox? Maybe something like "link" except for triggers and meshies? How exactly can this be implemented?

Code: Select all

mesh
  name Wall_TeamRed_1
  ----- Mesh Code Here (I'm too lazy) -----
end
trigzone
  name Free_TeamRed
  position XX YY ZZ
  rotation 0
  size 5 5 0
end
trigger
  team 1
  condition bullet
  zone Free_TeamRed
  drivethrough Wall_TeamRed_1
end
trigzone
  name Lock_TeamRedJail
  position XX YY ZZ
  rotation 0
  size 10 10 0
end
trigger
  team 1
  condition tank
  zone Lock_TeamRedJail
  undrivethrough Wall_TeamRed_1
end
Image

Inferno
Private First Class
Private First Class
Posts: 91
Joined: Sat Jan 22, 2005 6:52 pm
Contact:

Post by Inferno » Fri Mar 17, 2006 2:48 am

Inferno wrote:
My idea is very basic "triggers" but I'll explain it. Let's say you wanted to make a CTF map, like the way you play it in real life. If you get caught (shot) on the other teams side you spawn in jail that has a non-drivethrough mesh.

Ok, but how bout a semi-transparent meshbox? Very Happy
Oh yeh, that's right you are only 12.
So you'd need something to detect it and something else for the mesh / meshbox?
You are so smart
Maybe something like "link" except for triggers and meshies? How exactly can this be implemented?
We'll leave that up to the master programmer, I'm sure he has something in mind.

Theme97
Private First Class
Private First Class
Posts: 221
Joined: Fri Nov 11, 2005 8:04 pm
Contact:

Post by Theme97 » Fri Mar 17, 2006 3:59 am

Inferno wrote:Oh yeh, that's right you are only 12.
(Jeez, you're still not over that? Let it go. It's just a game.) Whats wrong with those anyway? Some people don't spend 24/7 making maps and would just like to make a quick and easy map.
We'll leave that up to the master programmer, I'm sure he has something in mind.
You suggested it, what did you expect? :|
Image

Inferno
Private First Class
Private First Class
Posts: 91
Joined: Sat Jan 22, 2005 6:52 pm
Contact:

Post by Inferno » Fri Mar 17, 2006 7:37 pm

ok, my idea for implementation:
trigger [activation: shot|tank] [color: all|TEAM_COLOR] [name of target mesh(es) or group(s)] [ 0|1 for drivethrough] [ 0|1 for shootthrough]

could be a property of define, group, mesh, or face


example:


mesh

trigger shot all jail_wall1,jail_wall2,jail_wall3 1 0

vertex -10 0 10
vertex -10 0 0
vertex 10 0 0
vertex 10 0 10

face
vertices 0 1 2 3
endface
end

mesh
name jail_wall1
etc.
etc.

Jo-W
Private First Class
Private First Class
Posts: 26
Joined: Sat Oct 01, 2005 9:33 pm

Post by Jo-W » Sun Apr 09, 2006 9:07 am

L4m3r wrote: You can't make something drivethrough and then not drivethrough; AFAIK the only way to make "gates" is with world weapons.
That could be done by implenting a function in the API that allows a plugin to modify parts of a map (not the map file) by using the name field.
something similar to document.getElementById('jail_wall1').style.driveThrough = false; (javascript & CSS)
I Carry ThA BiG GuN

Owner@localhost

pyr0
Private First Class
Private First Class
Posts: 144
Joined: Wed Jul 13, 2005 5:08 pm

Post by pyr0 » Sun Apr 09, 2006 1:36 pm

Are you just here to revive the topics that no one else cared to continue posting upon?

User avatar
L4m3r
Hater of Everything
Hater of Everything
Posts: 724
Joined: Tue Feb 08, 2005 5:15 am
Location: Los Angeles

Post by L4m3r » Sun Apr 09, 2006 4:41 pm

Jo-W wrote:That could be done by implenting a function in the API that allows a plugin to modify parts of a map (not the map file) by using the name field.
something similar to document.getElementById('jail_wall1').style.driveThrough = false; (javascript & CSS)
The game world is static. Once it's generated/loaded by the server, it cannot change. The world is sent to the client only when the client joins. Thus, even if you modified BZFS to change the map, it wouldn't be sent to anyone except new players who joined afterward, which would then mean that anyone who joined after the change would see a different world than anyone who joined beforehand.

In other words, world objects that changed would be a (big) protocol change, and I think there would be a more clever and bandwith-efficient way to do it.
Optimism is just a milder alternative to denial.

Post Reply