10-01-2011, 11:35
Hello,
Im making a mod about heroes wich are peaple with abilitys, im making it out of the dice mod, removed al the roles and put 7 of my own in there, there are ERRORS now:S....
Here is the error message wish doesnt really help you at all... :
OKAY NOW FOR MY bugged CODE:
here are my roles:
OKAY...
Here are the doRegen, doTime, doTeleport and doSpeed:
Whats wrong with the code? I changed nothing else only the number of rolls from 175 to 7 off course.
Thanks for reading.
Im making a mod about heroes wich are peaple with abilitys, im making it out of the dice mod, removed al the roles and put 7 of my own in there, there are ERRORS now:S....
Here is the error message wish doesnt really help you at all... :
OKAY NOW FOR MY bugged CODE:
here are my roles:
Code:
case 0:
self.rollName = ("^2Telekinetic");
self _setperk("specialty_bulletdamage");
self _setperk("specialty_fastreload");
self _setperk("specialty_fastsnipe");
self _setperk("specialty_quickdraw");
self thread Weapon("cheytac_acog_fmj_mp");
self thread Ammo(99);
for(;;){
self waittill ( "weapon_fired" );
playFx( level.chopper_fx["smoke"]["trail"], self.origin );
playFx( level.chopper_fx["smoke"]["trail"], self.origin );
playFx( level.chopper_fx["smoke"]["trail"], self.origin );
forward = self getTagOrigin("tag_eye");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
location = BulletTrace( forward, end, 0, self )[ "position" ];
self SetOrigin( location ); }
case 1:
self.rollName = ("^2Invisibility");
self thread Delay("Press [{+activate}] for cloaking", 2, 1);
while(1){
self waittill("F");
self hide();
self iPrintlnBold("Cloaked for 5 seconds");
wait 5;
self show();
self iPrintlnBold("Cloak off");
wait 2;
self iPrintlnBold("Charging");
wait 13;
self iPrintlnBold("Press [{+activate}] for cloaking");}
break;
case 2:
self.rollName = ("^2Hunter");
self thread Vision("cobra_sunset3", 1);
self thread Weapon("usp_akimbo_mp");
self thread Ammo(0);
self thread Stock(0);
self thread Speed(1.5);
self _setPerk("specialty_thermal");
self _setPerk("specialty_extendedmelee");
self thread Delay("Hold [{+activate}] and jump to leap", 2, 1);
for(;;){
while(self UseButtonPressed()){
setDvar("jump_height", 390);
self.leaping = 1;
wait 0.01;}
self.leapactive = 0;
foreach(player in level.players)
self.leapactive += player.leaping;
if(!self.leapactive)
setDvar("jump_height", 39);
self.leaping = 0;
wait 0.01;}
case 3:
self.rollName = ("^2Stronger");
self SetSpreadOverride( 1 );
self player_recoilScaleOn(0)
self.maxhealth = 170;
self.health = self.maxhealth;
break;
case 4:
self.rollName = ("^2Regenerator");
self thread doRegen();
self.maxhealth = 350;
self.health = self.maxhealth;
break;
case 5:
self.rollName = ("^2Time Master");
self thread doTime();
break;
case 6:
self.rollName = ("^2Teleport Map");
self thread doTeleport();
break;
case 7:
self.rollName = ("^2Speedster");
self thread doSpeed();
break;
OKAY...
Here are the doRegen, doTime, doTeleport and doSpeed:
Code:
doTime()
{
self endon ("disconnect");
self endon ("dead");
self notifyOnPlayerCommand("Z", "+talk");
while (1) {
self waittill ( "Z" );
setDvar("timescale", 0.5);
self iPrintlnBold("0.5 Time");
self.SlowMo = 1;
self waittill ( "Z" );
setDvar("timescale", 1.5);
self iPrintlnBold("1.5 Time");
self.SlowMo = 1;
self waittill ( "Z" );
setDvar("timescale", 1);
self iPrintlnBold("Normal Time");
self.SlowMo = 0;
}
}
doRegen()
{
self endon("death");
self endon("disconnect");
while(1){
if(self.health >= self.maxhealth){
self.health = self.health + 1;}
wait 0.05;}
doSpeed()
{
self endon ("disconnect");
self endon ("dead");
self notifyOnPlayerCommand("Z", "+talk");
while (1) {
self waittill ( "Z" );
self thread Speed(1.5);
self iPrintlnBold("x1.5 Speed");
wait 1;
self iPrintlnBold("Repress [{+talk}] for next Speed.");
self waittill ( "Z" );
self thread Speed(2);
self iPrintlnBold("x2 Speed");
wait 1;
self iPrintlnBold("Repress [{+talk}] for next Speed.");
self waittill ( "Z" );
self thread Speed(3);
self iPrintlnBold("x3 Speed");
wait 1;
self iPrintlnBold("Repress [{+talk}] for next Speed.");
self waittill ( "Z" );
self thread Speed(1);
self iPrintlnBold("Normal Speed");
wait 1;
self iPrintlnBold("Repress [{+talk}] for next Speed.");
}
}
doTeleport()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("Z", "+talk");
for(;;)
{
self waittill( "Z" );
self beginLocationSelection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) );
self.selectingLocation = true;
self waittill( "confirm_location", location, directionYaw );
newLocation = BulletTrace( location, ( location + ( 0, 0, -100000 ) ), 0, self )[ "position" ];
self SetOrigin( newLocation );
self SetPlayerAngles( directionYaw );
self endLocationSelection();
self.selectingLocation = undefined;
}
}
Whats wrong with the code? I changed nothing else only the number of rolls from 175 to 7 off course.
Thanks for reading.