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

Scripting Help

broken avatar :(
Created 10 years ago
by RichGaming
0 Members and 1 Guest are viewing this topic.
4,350 views
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 9 November 2013
Last active: 5 years ago
Posts
502
Respect
Forum Rank
Zombie Enslaver
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Custom Zombies Videos: YouTube.com/RichGaming
Signature
YouTube: YouTube.com/RichGaming
Twitter: Twitter.com/RichGaming

×
RichGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Mapper Has released one or more maps to the UGX-Mods community.
RichGaming's Contact & Social LinksRich_Gamingrichgaming1RichGamingRichGaming1
So I have a script for an easter egg within my map but wish to alter it slightly to preference. This is the skull easter egg that some of you may be familiar with as I used it in Bus Depot. I am trying to change the script so that the skulls can only be activated with a certain weapon / secondary. I would also like for the reward to spawn a script_struct instead of a weapon. If anyone can help me with this that would be great. Thanks!

Here's the script at the current stage: http://pastebin.com/sqXNJgSe

(Use it in your map and I'll stab you with a spoon :) )
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
cant spawn a script_struct in script

but to make the retriever grab these things, they just need

"targetname" - "powerup" i believe
broken avatar :(
×
broken avatar :(
Location: kp
Date Registered: 29 July 2015
Last active: 7 years ago
Posts
435
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
children should not be playing call of duty
Signature
⠀⠀⠀⣴⣴⡤
⠀⣠⠀⢿⠇⡇⠀⠀⠀⠀⠀⠀⠀⢰⢷⡗
⠀⢶⢽⠿⣗⠀⠀⠀⠀⠀⠀⠀⠀⣼⡧⠂⠀⠀⣼⣷⡆
⠀⠀⣾⢶⠐⣱⠀⠀⠀⠀⠀⣤⣜⣻⣧⣲⣦⠤⣧⣿⠶
⠀⢀⣿⣿⣇⠀⠀⠀⠀⠀⠀⠛⠿⣿⣿⣷⣤⣄⡹⣿⣷
⠀⢸⣿⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⢿⣿⣿⣿⣿⣿
⠀⠿⠃⠈⠿⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⠿⠿⠿

⠀⢀⢀⡀⠀⢀⣤⠀⠀⠀⠀⠀⠀⠀⡀⡀
⠀⣿⡟⡇⠀⠭⡋⠅⠀⠀⠀⠀⠀⢰⣟⢿
⠀⣹⡌⠀⠀⣨⣾⣷⣄⠀⠀⠀⠀⢈⠔⠌
⠰⣷⣿⡀⢐⢿⣿⣿⢻⠀⠀⠀⢠⣿⡿⡤⣴⠄⢀⣀⡀
⠘⣿⣿⠂⠈⢸⣿⣿⣸⠀⠀⠀⢘⣿⣿⣀⡠⣠⣺⣿⣷
⠀⣿⣿⡆⠀⢸⣿⣿⣾⡇⠀⣿⣿⣿⣿⣿⣗⣻⡻⠿⠁
⠀⣿⣿⡇⠀⢸⣿⣿⡇⠀⠀⠉⠉⠉⠉⠉⠉⠁
×
Koan's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Koan's Contact & Social Links_Koan_h-rmy website
cant spawn a script_struct in script

But I've done it before?

Code Snippet
Plaintext
var = spawn("script_struct",self getorigin());

What am I missing? :poker:
Last Edit: June 16, 2016, 05:31:46 pm by Koan
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
×
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
it doesnt, i checked this the other day

script_structs can be created in radiant, and used, but not in "created" in script

ent = spawn( "script_struct", origin );

iPrintLn( isDefined( ent ) );

prints "undefined"


this is why treyarch dont do it either, they spawn script_origin or models with "tag_origin"
Last Edit: June 16, 2016, 05:43:36 pm by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 9 November 2013
Last active: 5 years ago
Posts
502
Respect
Forum Rank
Zombie Enslaver
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Custom Zombies Videos: YouTube.com/RichGaming
×
RichGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Mapper Has released one or more maps to the UGX-Mods community.
RichGaming's Contact & Social LinksRich_Gamingrichgaming1RichGamingRichGaming1
cant spawn a script_struct in script

but to make the retriever grab these things, they just need

"targetname" - "powerup" i believe

I cant change the targetname of the skulls as they are spawned through a trigger with a certain targetname. How else would I go about making it so only the retriever can pick them up instead of any weapon. Also, if I cannot spawn a script_struct how would I go about spawning the upgraded hells redeemer as the reward weapon. Thanks for the help!
Last Edit: June 16, 2016, 05:51:34 pm by RichGaming
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
×
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
have it in the map already underneath and "move" it when done

and add your other targetname to my retriever script so it grabs that too
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 2 years ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Signature
My preferred name is "xSanchez78".
Check me out here: www.steamcommunity.com/id/xSanchez78
×
alaurenc9'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.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
guys really? nobody knows how script_structs work?

basically, script_structs are "fake" entities, they do not count against g_spawn, which means you can place as many as you want in radiant or spawn as many as you want in script. They also cannot be deleted because they don't have to be deleted. Since they are "fake" entities, you cannot use GetEntArray or GetEnt to define them from radiant. You have to use created utility functions, called GetStructArray and GetStruct.
it doesnt, i checked this the other day

script_structs can be created in radiant, and used, but not in "created" in script

ent = spawn( "script_struct", origin );

iPrintLn( isDefined( ent ) );

prints "undefined"


this is why treyarch dont do it either, they spawn script_origin or models with "tag_origin"
??? Treyarch uses structs in script ALL the time, it is a great way to define stuff on something or notify stuff on something without spawning a new ent to worry about g_spawn. And really? No one knows about
Code Snippet
Plaintext
struct = SpawnStruct();
Last Edit: June 16, 2016, 06:34:10 pm by alaurenc9
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 4 months ago
Posts
1,863
Respect
Forum Rank
Zombie Destroyer
Primary Group
Mapper
My Groups
More
Personal Quote
ok
Signature
Aye mate you don't know me so y don't you shut tf up ok buddy :)

×
Scobalula'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
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Scobalula's Contact & Social Links
guys really? nobody knows how script_structs work?

basically, script_structs are "fake" entities, they do not count against g_spawn, which means you can place as many as you want in radiant or spawn as many as you want in script. They also cannot be deleted because they don't have to be deleted. Since they are "fake" entities, you cannot use GetEntArray or GetEnt to define them from radiant. You have to use created utility functions, called GetStructArray and GetStruct. ??? Treyarch uses structs in script ALL the time, it is a great way to define stuff on something or notify stuff on something without spawning a new ent to worry about g_spawn. And really? No one knows about
Code Snippet
Plaintext
struct = SpawnStruct();

It was documented on their wiki I think, remember seeing it on Mapper's United Wiki which I think was from 3arc wiki before it got removed.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 12 September 2014
Last active: 5 years ago
Posts
103
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
Signature
Dead Palace
×
Riptide1106's Groups
Riptide1106's Contact & Social Links
as far as with only certain weapon... what comes to mind is to change weapon types in the weapon files. in other words change your pistols to be read as rifles, and the gun you want to be read as pistol. then set your trigger damage to pistols only.

never tested this, just an idea. there may be a better way.
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 9 November 2013
Last active: 5 years ago
Posts
502
Respect
Forum Rank
Zombie Enslaver
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Custom Zombies Videos: YouTube.com/RichGaming
×
RichGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Mapper Has released one or more maps to the UGX-Mods community.
RichGaming's Contact & Social LinksRich_Gamingrichgaming1RichGamingRichGaming1
Harry is kindly sorting this for me, thanks anyway guys.
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
×
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
guys really? nobody knows how script_structs work?

basically, script_structs are "fake" entities, they do not count against g_spawn, which means you can place as many as you want in radiant or spawn as many as you want in script. They also cannot be deleted because they don't have to be deleted. Since they are "fake" entities, you cannot use GetEntArray or GetEnt to define them from radiant. You have to use created utility functions, called GetStructArray and GetStruct. ??? Treyarch uses structs in script ALL the time, it is a great way to define stuff on something or notify stuff on something without spawning a new ent to worry about g_spawn. And really? No one knows about
Code Snippet
Plaintext
struct = SpawnStruct();
they are "data" structs

i said spawn( "script_struct" ) - does not work...

Last Edit: June 16, 2016, 09:24:57 pm by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 2 years ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
alaurenc9'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.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
they are "data" structs

i said spawn( "script_struct" ) - does not work...

(Image removed from quote.)
"data" structs and script_structs are the same thing.

 
Loading ...