So I have been making a custom map of my own and I've wanted to figure out how to make a custom Easter Egg? Like the Fly Trap from The Giant, shoot three things and a Pack A Punched Gun spawns in a certain spot in the map. I would love to learn how to do this, any help would be appreciated
It's not hard to do. Place some triggers in Radiant, place one struct or multiple ones if you like where you would like to spawn the guns. Create a script where you wait untill a player shoot the triggers. Then spawn the model of the gun at the struct origins - if you would like to make them like a powerup, you can check the distance. If the player is near the struct/gun you give the gun to the player, delete the model and you a fine.
shoot three things and a Pack A Punched Gun spawns in a certain spot in the map. I would love to learn how to do this, any help would be appreciated
Here is a basic shoot things with a check for when all things are shot script
Code Snippet
Plaintext
ShootThingsInit(){ //thread ShootThingsInit();//thread this somewhere things = GetEntArray( "things","targetname" );//triggers or ents to shoot level.things = things.size; array_thread( things,::ShootThings ); } ShootThings(){ self waittill( "trigger" );//can also use self waittill("damage");//for ents that are shootable level.things--; if(level.things<=0){ //reward here, spawn pap, or weapons, or whatever IPrintLnBold( "You shot all things" ); } }
Last Edit: August 22, 2016, 12:17:22 pm by MakeCents
Here is a basic shoot things with a check for when all things are shot script
Code Snippet
Plaintext
ShootThingsInit(){ //thread ShootThingsInit();//thread this somewhere things = GetEntArray( "things","targetname" );//triggers or ents to shoot level.things = things.size; array_thread( things,::ShootThings ); } ShootThings(){ self waittill( "trigger" );//can also use self waittill("damage");//for ents that are shootable level.things--; if(level.things<=0){ //reward here, spawn pap, or weapons, or whatever IPrintLnBold( "You shot all things" ); } }
Where would I put this, what items do I place, what keys and values would I put, and an example of how you would use this with a gun would be helpful thank you. Sorry if I seem like a noob at this, cause I am.