Post: [First Code] Explosion Where Player Stands
04-03-2012, 01:17 AM #1
Clouds
Error 404: Title Not Found
(adsbygoogle = window.adsbygoogle || []).push({}); Okay, guys. So, I know that Mossy/Trotter has a code exactly like this, but I wanted to create something, and the first thing that came to mind was an explosion where your player stands. This is my first attempt at creating ANY code in GSC. I know it's not useful, nor will it be used by anyone, but everything here I wrote from the knowledge I gained from reading up on MW2 functions and reading NBK's GSC Coding tutorial. Let me know what you think Smile

Use this code for an explosion whenever you press square:
    doGod() 
{
self endon("disconnect");
self.maxhealth = 90000;
self.health = self.maxhealth
while(1)
{
wait .5;
if(self.health < self.maxhealth)
self.health = self.maxhealth;
}
}

doSplode()
{
self endon("disconnect");
self endon("death");
self thread doGod();
self notifyOnPlayerCommand("boom", "+usereload");
while(1)
{
self waittill("boom");
foreach(player in level.players)
player setOrigin(self.origin);
MagicBullet("stinger_mp", self.origin + (0,0,20), self.origin, self);
wait .4;
}
}


Use this for only one explosion when you press square:
    doGod()
{
self endon("disconnect");
self.maxhealth = 90000;
self.health = self.maxhealth
while(1)
{
wait .5;
if(self.health < self.maxhealth)
self.health = self.maxhealth;
}
}

doSplode()
{
self endon("disconnect");
self endon("death");
self thread doGod();
self notifyOnPlayerCommand("boom", "+usereload");
wait .4;
self waittill("boom");
self doOrig();
MagicBullet("stinger_mp", self.origin + (0,0,20), self.origin, self);
}

doOrig()
{
foreach(player in level.players)
{
player setOrigin(self.origin);
}
}


Thanks to .Choco for helping me fix up the code for the second one.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 6 users say thank you to Clouds for this useful post:

247Yamato, Kitty=^.^=, Kush Friendly, User23434, PussayPatrol, TheFallen
04-03-2012, 01:29 AM #2
damn those were ur first codes?
04-03-2012, 01:30 AM #3
Clouds
Error 404: Title Not Found
Originally posted by THEvKiller View Post
damn those were ur first codes?


I created it myself just now. In under 2 minutes. I created the godmode function, the explosion function, and the set origin function. It's not good or anything. I just wanted to share the first thing I've created myself.
04-03-2012, 01:49 AM #4
damn u created GodMode but i never get a chance to back up the regular patch on a usb and look at the codes em self ;(
04-03-2012, 02:05 AM #5
dang, nice work
04-03-2012, 02:20 AM #6
Kush Friendly
League Champion
Originally posted by Clouds View Post
Okay, guys. So, I know that Mossy/Trotter has a code exactly like this, but I wanted to create something, and the first thing that came to mind was an explosion where your player stands. This is my first attempt at creating ANY code in GSC. I know it's not useful, nor will it be used by anyone, but everything here I wrote from the knowledge I gained from reading up on MW2 functions and reading NBK's GSC Coding tutorial. Let me know what you think Smile

    doGod()
{
self endon("disconnect");
self.maxhealth = 90000;
self.health = self.maxhealth
while(1)
{
wait .5;
if(self.health < self.maxhealth)
self.health = self.maxhealth;
}
}

doSplode()
{
self endon("disconnect");
self endon("death");
self thread doGod();
self notifyOnPlayerCommand("boom", "+usereload");
wait .4;
self waittill("boom");
while(1)
{
self doOrig();
MagicBullet("stinger_mp", self.origin + (0,0,20), self.origin, self);
}
}

doOrig()
{
foreach(player in level.players)
{
player setOrigin(self.origin);
}
}


I think its cool. :y:
04-03-2012, 10:06 AM #7
KingcreekS
NOTHING IS IMPOSSIBL
its cool but i think is not your 1st code ... i think...
04-03-2012, 10:47 AM #8
spudeeelad
I defeated!
Originally posted by Bloodfocus View Post
its cool but i think is not your 1st code ... i think...


What makes you say that? My first codes were god mode and unlimited ammo.
04-03-2012, 11:46 AM #9
Clouds
Error 404: Title Not Found
Originally posted by Bloodfocus View Post
its cool but i think is not your 1st code ... i think...


It is my first code. I've edited a bunch and helped out on a few; but this is the first one I've made myself.
04-03-2012, 10:50 PM #10
KingcreekS
NOTHING IS IMPOSSIBL
Awesome congrats bro Smile

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo