UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

[FUNCTION] spawn_trig_on_notify()

broken avatar :(
Created 11 years ago
by daedra descent
0 Members and 1 Guest are viewing this topic.
4,845 views
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
Utility function that spawns a trigger_radius that can then be used as a normal trigger. If you just want it to spawn and return a trigger you could just remove the notify stuff too.

Function may already exist somewhere in the bowels of the _utility scripts, but i'm too lazy to find it, so i made this instead.

Notice: Function DOES NOT check that each argument has been defined and is the correct datatype, so make sure you pass the correct information properly.

Code Snippet
Plaintext
//	Name: spawn_trig_on_notify
// Purpose: To spawn a trigger_radius at the given origin with the given radius, height, and flags
//
// Arguments(name(dataType): description):
// notifyStr(String): The string to wait for before spawning the trig
// Origin(origin): The origin of the trig you want to spawn
// radius(int): radius of the trigger
// height(int): height of the trigger
// spawnflags(int): the spawnflags that you want the trigger to spawn with
//
// Example code:
// trig = spawn_trig_on_notify("ee_blocker_open", self.origin, 24, 24, 0);
//
spawn_trig_on_notify(notifyStr, origin, radius, height, spawnflags)
{
level waittill(notifyStr);

trig = spawn("trigger_radius", origin, spawnflags, radius, height);
trig SetCursorHint("HINT_NOICON");

for(i=0;i<get_players().size;i++)
trig setVisibleToPlayer(get_players()[i]);

return trig;
}

You could possibly use this to spawn triggers on an entity only when a zone is opened, thus potentially reducing the amount of hintstrings in the map. Just a theory though, haven't test it.
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
Nice work +1
broken avatar :(
×
broken avatar :(
Location: gbNewport
Date Registered: 2 November 2014
Last active: 4 years ago
Posts
1,265
Respect
Forum Rank
Zombie Colossus
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Embrace the Darkness
×
Tim Smith's Groups
Tim Smith's Contact & Social LinksTimSmithtimsmith90THEREALBaDBoY17My clan Website
i don't know what the hell this is for but ty anyway :D

+1
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
i don't know what the hell this is for but ty anyway :D

+1

Spawning a trigger after a notify has been sent?

Example: triggers to perks don't spawn until the zone has been opened(reduces hintstrings). Not tested that specifically though.
broken avatar :(
×
broken avatar :(
Location: usUnion, Kentucky
Date Registered: 9 September 2013
Last active: 3 years ago
Posts
310
Respect
Forum Rank
Perk Hacker
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
lilrifa's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
lilrifa's Contact & Social Linkslilrifaskypeuser724lilrifa
Nice function. +1

 
Loading ...