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!
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
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
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.
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
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.
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.
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