Welcome, Guest. Please login or register.
Did you miss your activation email?
October 17, 2021, 07:15:30 am

Login with username, password and session length
Search:     Advanced search
Savage: XR is a new patch for Savage, created by the Newerth.com staff. The XR1.1 Client is out now! Download it now!
190122 Posts in 11015 Topics by 18626 Members
Latest Member: RabbitWhite
* Home Forum Wiki Help Search Login Register
+  Newerth Forums
|-+  Savage XR
| |-+  Mapping & Modding Forum
| | |-+  SUPPORT: Triggers Discussion Thread (Help and Advice)
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: 1 2 [3] 4 Go Down Print
Author Topic: SUPPORT: Triggers Discussion Thread (Help and Advice)  (Read 29994 times)
Hakugei
XR Coder
Legendary Member
***
Posts: 3837



View Profile
« Reply #30 on: June 05, 2013, 11:18:00 am »

You sent a PM, here I am!

I'd like to give random buffs at specific intervals to all players on map.
So.. I have currently to test:
430000ms interval min, no max set
Flag0 is event
Flag1 is obj_client

Script is set to:
@activate
!givestate target all adrenaline 430000

.. Is this correct for giving adrenaline at a 43 second interval to all players on the map??
No, not quite.
1 second = 1000ms. Your interval is 430 seconds. :p
I assume you're using an interval trigger and not an aabox/aaplane trigger, and thus the trigger's "target" is not a client (Flag1 has nothing to do with it and you might as well remove it) - in this case the "target" would be the trigger itself (aka empty). And since !givestate needs a target no matter what, there is no way this would work even if you edited it. Also, givestate doesn't have an "all" feature.

But fret not, as you can use a server command instead of a GS command to do your bidding.
Server commands are called with the GS command !exec.


Code:
@activate
!exec "givestate clientId adrenaline 43000"
Syntax:
!exec <object> [client] "command"
givestate <client> <stateName> [duration]



Also, if I would like to spawn an NPC at a specific time and place.. I am using for test:
Interval min/max is 400000
Flag0 is event
all other are null

Script is set to:
@activate
!spawnobject target npc_kongor 0 hostile coords (26233022)
This one is on the right path and nearly correct. (Interval is 400 seconds?)

"hostile" makes the NPC attack the "target", but the target (as explained above) is the trigger/empty, thus that won't work as you envision.
Also, the coordinations at the end are to be written without the brackets and leave a space between them.

Code:
@activate
!spawnobject target npc_kongor 0 neutral coords 2623 3022


Hope this helps; if you need more I'd appreciate another PM to get my attention. Smiley
Or throw a generous bribe at Daemon to give out my super secret Skype - he's been doing that more often lately. Huh

Bonus link:
seconds-to-milliseconds-converter if you wish not to do math.
Logged
SavageBeard
XR Map Administrator
Sr. Member
***
Posts: 263


View Profile
« Reply #31 on: June 05, 2013, 06:23:18 pm »

Bonus link:
seconds-to-milliseconds-converter if you wish not to do math.

Thank god for a seconds to milliseconds converter!  Derp  Cheesy
Logged
shuN
Perverted yet determined
XR Mapper
Sr. Member
****
Posts: 467



View Profile
« Reply #32 on: June 05, 2013, 10:44:43 pm »

that's awesome.. thank you Clemens. As I work more with triggers and especially scripts, it comes to my attention how much control you and other devs gave to us mappers.

I was on US Leet last night asking various mappers about triggers and scripts, and I was astounded by how many did not know about it. Even I only know how to trigger-script a teleport.. or jumppad.. MAYBE a heal spot. Effects can be tedious also if you don't know how to edit them and want something different then the preset.

A lot of people don't care about this, and some may even reject it; however, I feel that with the right amount of time, and necessary learning curve takin care of.. a mapper can create something with the scripts and triggers that is more then just a basic map. It can turn into an experience for a gamer.

Mind you, I do feel that sometimes simple is a necessity.. and many many maps have accomplished that, but I also feel there needs to be a variety available for the players that want to try something new in a 10 year old game. See: xr_zone .. a tribute to classic FPS games, but rejected due to it's difference in Savage. Also, the scripts you created in the tutorials.. phenomenal. My 7 year old step son was entwined by accomplishing each step.

As I have said in the past, I am glad and a lot of others are at what you developer VOLUNTEERS have done with this game. Even though some may quit, have gone, or will be going away.. the impression will last for a long time.  Afro 
Logged

Darkness shines in even the brightest of light.

Quote from: Standard
when i tried www(comma)google.com something didnt work...
Quote from: Cross
add my face to the crotch of savage
Daemon
XR Main Developer
Legendary Member
****
Posts: 4823


beware, for this is the everbroken...


View Profile
« Reply #33 on: June 05, 2013, 10:58:15 pm »

Xr_zone was not finished - not working properly afaik. Care to do it yourself? Cheesy
Logged

shuN
Perverted yet determined
XR Mapper
Sr. Member
****
Posts: 467



View Profile
« Reply #34 on: June 05, 2013, 11:11:30 pm »

we loaded it and tried.. but apparently you could not elect a commander.. I was hoping a ref could just start the game, I believe that would have worked fine. Is that the only issue?

The only thing I would have liked added was to script goodiebags with weapons randomly spawning throughout the match. This would definitely pay tribute to classic FPS. I saw health packs in one of the corners of the map, so I'm sure placing weapon icons in various spots would be fine, and I could just issue a trigger/script on those weapon icons to give the player said weapon if their slot is empty. For now, that is beyond me.. but I will get up there.   Afro
Logged

Darkness shines in even the brightest of light.

Quote from: Standard
when i tried www(comma)google.com something didnt work...
Quote from: Cross
add my face to the crotch of savage
Daemon
XR Main Developer
Legendary Member
****
Posts: 4823


beware, for this is the everbroken...


View Profile
« Reply #35 on: June 06, 2013, 08:15:38 am »

It's meant to be a deathmatch map, not to follow the normal game course.
Logged

shuN
Perverted yet determined
XR Mapper
Sr. Member
****
Posts: 467



View Profile
« Reply #36 on: June 06, 2013, 05:21:53 pm »

Oh? .. In it's current state, Ane has programmed the match to end when one team controls the center location after 50 ticks.
I would prefer to have it where the first team to a certain number of kills is declared the winner. With floating weapon icons picked up upon passing thru them.. as that defeats the need to research tech.. and only allows ranged weapons besides melee without buff/enchantments. Also, the ability for both teams to pick up each others weapons.. lego with temp or pred with coil.. etc.

As it stands, I've refreshed the new xr_hourglass map (was xr_zook) .. And I've been able to finish the scripts for events, npc random spawns, and triggers within, even creating a trigger that teleports behes and catas only back to their respected home base.. but whenever I try to call and test, I get overwhelmingly denied. The consensus is that players prefer old, classic maps that have no new props, no triggers, no scripts, no detail effecting FPS.

I really wish I knew why.. After testing with a player or two, I realized I don't make the greatest maps.. even ones that get known by name.. but I do try to create something unique. Not to boost my ego, but xr_hourglass I believe is a fine fine map; however, I have pretty much been told I should work on creating new maps with all the aspects of an old map.
Logged

Darkness shines in even the brightest of light.

Quote from: Standard
when i tried www(comma)google.com something didnt work...
Quote from: Cross
add my face to the crotch of savage
Daemon
XR Main Developer
Legendary Member
****
Posts: 4823


beware, for this is the everbroken...


View Profile
« Reply #37 on: June 06, 2013, 05:31:33 pm »

Welcome to my world.
Logged

shuN
Perverted yet determined
XR Mapper
Sr. Member
****
Posts: 467



View Profile
« Reply #38 on: June 06, 2013, 06:30:22 pm »

sooo.. I may as well turn back before I start.  Afro
Logged

Darkness shines in even the brightest of light.

Quote from: Standard
when i tried www(comma)google.com something didnt work...
Quote from: Cross
add my face to the crotch of savage
Aneurysm
XR Map Administrator
Super Hero Member
***
Posts: 1204



View Profile
« Reply #39 on: July 07, 2013, 04:17:24 pm »

Oh? .. In it's current state, Ane has programmed the match to end when one team controls the center location after 50 ticks.
I would prefer to have it where the first team to a certain number of kills is declared the winner. With floating weapon icons picked up upon passing thru them.. as that defeats the need to research tech.. and only allows ranged weapons besides melee without buff/enchantments. Also, the ability for both teams to pick up each others weapons.. lego with temp or pred with coil.. etc.

As it stands, I've refreshed the new xr_hourglass map (was xr_zook) .. And I've been able to finish the scripts for events, npc random spawns, and triggers within, even creating a trigger that teleports behes and catas only back to their respected home base.. but whenever I try to call and test, I get overwhelmingly denied. The consensus is that players prefer old, classic maps that have no new props, no triggers, no scripts, no detail effecting FPS.

I really wish I knew why.. After testing with a player or two, I realized I don't make the greatest maps.. even ones that get known by name.. but I do try to create something unique. Not to boost my ego, but xr_hourglass I believe is a fine fine map; however, I have pretty much been told I should work on creating new maps with all the aspects of an old map.

My original intention with this map (xr_zone) was to create a hybrid of melee/ranged combat that harkened closer to a traditional FPS type game, but still lent itself to letting melee lovers do their thing. I decided to tread down this path after coming to the same conclusion that you and everyone else eventually reaches; no one currently playing savage wishes to evolve the game play/style.
The game is fun for the majority of players because it is a big frag fest that makes a player feel good about themselves when they get massive k/d ratios. Far less important to the average player is the other facets of the game, this is why commanding stopped being interesting years ago and why the meta game hasn't seen a shift in half a dozen years.

So I decided that rather than trying to fight this sensless battle, I might as well try and make a map that caters to the play style that the population seemingly enjoys. I made reasonable headway with the map itself, but got stuck in the scripting stage with a couple of triggers/scripts that I just couldn't muscle my way through. Moh was helping me at the time but he got busy with other things and never got back to me with a solution. Meanwhile I had other things take over my life, savage totally died in Australia and I guess I just moved on.

All this to say that if you want to take my map and run with it, by all means use it in any way you see fit. Despite Savage giving me some of the best memories of my life to date I highly doubt I will ever return to the game. You can view the discussion I had running on Pirate Pad with Moh re my triggers for the map here

http://piratepad.net/xr-wip

For that matter, anyone looking to borrow/beg or steal from any of the maps that I have uploaded you have my full blessing; while the embers of newerth have cooled in my hearth, may they burn on brightly in others!
« Last Edit: July 07, 2013, 04:52:39 pm by Aneurysm » Logged

KingKong_
Full Member
***
Posts: 122


View Profile
« Reply #40 on: March 24, 2015, 12:36:25 pm »

Too lazy to look it up so I'm asking upfront. 

For instance:
There are 3 spawn flags.
Flags A and B in the same area and flag C across the map.
Is there a trigger that allows a team to gain control of flag C, even though it is unreachable, if they capture flag A or B?

I was wondering, is this actually possible? I don't mean the condition part, but changing the owner of an existing spawnflag. It's easy to set the team of a new spawnflag when using !spawnobject, but I looked through all the info I can find and didn't find anything about changing the team of an existing object.
Logged
Aneurysm
XR Map Administrator
Super Hero Member
***
Posts: 1204



View Profile
« Reply #41 on: March 28, 2015, 02:19:17 am »

Too lazy to look it up so I'm asking upfront. 

For instance:
There are 3 spawn flags.
Flags A and B in the same area and flag C across the map.
Is there a trigger that allows a team to gain control of flag C, even though it is unreachable, if they capture flag A or B?

I was wondering, is this actually possible? I don't mean the condition part, but changing the owner of an existing spawnflag. It's easy to set the team of a new spawnflag when using !spawnobject, but I looked through all the info I can find and didn't find anything about changing the team of an existing object.

Just use the script to destroy the existing flag and spawn a new one in the same location with the new team controlling it.
Logged

KingKong_
Full Member
***
Posts: 122


View Profile
« Reply #42 on: March 29, 2015, 11:02:52 am »

Just use the script to destroy the existing flag and spawn a new one in the same location with the new team controlling it.

That would work, but I have no idea how to destroy an object either, I actually thought that that's also not possible. If there really is a way to destroy objects, it'll open up a lot of new possibiliies.

By the way, would you give your permission to use the bubble asset you made for other Savage maps aswell? I'd like to release the effects and scripts in xr_bubbles so all mappers who wish can use them.
Your transparent bubbles are great at creating the underwater look for a map. Everything else in use is either public domain or attribution licensed.
Logged
Aneurysm
XR Map Administrator
Super Hero Member
***
Posts: 1204



View Profile
« Reply #43 on: March 30, 2015, 09:03:01 am »

Just use the script to destroy the existing flag and spawn a new one in the same location with the new team controlling it.

That would work, but I have no idea how to destroy an object either, I actually thought that that's also not possible. If there really is a way to destroy objects, it'll open up a lot of new possibiliies.

By the way, would you give your permission to use the bubble asset you made for other Savage maps aswell? I'd like to release the effects and scripts in xr_bubbles so all mappers who wish can use them.
Your transparent bubbles are great at creating the underwater look for a map. Everything else in use is either public domain or attribution licensed.

Anything I have ever created for Savage mapping or otherwise is free for use.



http://www.newerth.com/wiki/index.php?title=XR_Script_Triggers

"!die <object>"
Kill Object

I can't say I have personally used this, but I'm virtually certain this has been used somewhere. You should check Mohicans human tutorial map scripts as its likely he has used it in that map somewhere.
Logged

KingKong_
Full Member
***
Posts: 122


View Profile
« Reply #44 on: March 30, 2015, 11:19:49 am »

Anything I have ever created for Savage mapping or otherwise is free for use.
Thank you, I'll make a post about how to use the water scripts & effects after I've verified that the latest version works well on the server.

Quote
http://www.newerth.com/wiki/index.php?title=XR_Script_Triggers

"!die <object>"
Kill Object

I can't say I have personally used this, but I'm virtually certain this has been used somewhere. You should check Mohicans human tutorial map scripts as its likely he has used it in that map somewhere.

Couldn't get this to work with a spawnflag with on-inside trigger. I guess there's two possible reasons why it doesn't work, either none of the flags in trigger conditions match a spawnflag (I tested them all), or the flags match but !die doesn't work for it.The !search-function for looking up objects might be the key here, but I can't get it to work for even the simplest tests, and can't find an example of a map where it's used.

However, on-inside trigger that kills the target when a condition is true does work for a garrison/sublair, so spawning and killing an outpost would work as a poor man's substitute for a spawnflag.

e:

looking through the hum tutorial reavealed a lot of stuff that will help in making a commanderless map for small teams, perhaps i'll try that next.
« Last Edit: March 30, 2015, 11:26:41 am by KingKong_ » Logged
Pages: 1 2 [3] 4 Go Up Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.031 seconds with 19 queries.