That does sound like a great idea! CS:GO has a lot of different skins for certain guns and having a machine give you a random skin for the gun would be awesome.
Would each gun have to have the same exact skins, or would it be possible to tell what gun the player is getting the random skin for and it picks from that list of skins?
Yeah i was thinking that some skins could give guns specialties, example: Dragon Lore; shoots fire shots or Howl; Has a secondary fire that lets out a yelping scream that blows the heads off of zombies
thats weird... I just tried to do it again by copying and pasting everything you did and it still doesnt print?? Is there something wrong with my map then?
1. gravity_spikes_upgraded_main() isn't a defined function, so you will get an undefined function error. 2. Your while loop in SpikeRadiusDamage() has no wait in it and this will give you an infinite loop error. 3. Logically it doesn't make sense for your while loop to even be there, basically if the player is on the ground then it just keeps doing a radius damage forever. 4. You do not need to recursively call weapon_check() if its already on a loop
1. It is defined, i just didnt include it in the script i was showing because it is the same as gravity_spikes_main() because i havent worked on it yet.
2/3/4 I made it so it would do the radius damage then it would thread weapon check which would then wait til the player fired again and loop around... thought that would work... Double Post Merge: October 18, 2015, 08:26:08 am
That's quite odd, cause looking at it there should be no issue with putting the wait there. I would recommend putting an iprintln right after the wait and another right at the beginning of SpikeRadiusDamage() just to see where the issue occurs.
Also, now that I've read through your script I can see a couple other issues as well:
Code Snippet
Plaintext
self endon( "disconnect" );
This won't do anything since its in the init function and not called on a player. You should move that into the beginning of the weapon_check() function.
Secondly I see a little bit of a logic error, if the player isn't on the ground after the wait then it won't do the damage, so you could replace the wait with a while loop that waits until the player is on the ground.
Also I don't really get what your doing with the setVelocity - but if that works then whatever lol
Yeah thanks for the disconnect help, forgot that i hadnt defined self. Ech the script logic, just realised XD thanks. Yeah im just messing around with the velocity atm seeing what fits best. Thank you for the help