Its may an idea to remove the Damagefeedback at this part (red screen). Would look more "realistic" (ye, jump pad - realisticnvm).
Its may an idea to remove the Damagefeedback at this part (red screen). Would look more "realistic" (ye, jump pad - realisticnvm).
No ... No ... this is not possible .......
When i want to watch the video, it says: "Error loading media: File could not be played" on Chrome, and Firefox is just showing a black screen.![]()
timescale 0.01
mhh, its a beta xf video url: http://beta.xfire.com/videos/5d5d6e
maybe classic xf:http://classic.xfire.com/video/5d5d6e/
kung foo man (15th January 2013)
multiple trigger(trigger->multiple)
script->origin
PHP Code:
main()
{
thread OnPlayerConnect();
}
PHP Code:
OnPlayerConnect()
{
jump = getEntArray("TRIGGER_NAME","targetname");
if(isDefined(jump))
for(kat=0;kat<jump.size;kat++)
jump[kat] thread bounceJump();
}
PHP Code:
bounceJump()
{
target = getEnt("ORIGIN_NAME","targetname") getOrigin();
while(1)
{
self waittill("trigger", user);
model = spawn("script_model",(0,0,0));
model.origin=user.origin+(randomInt(90),randomInt(10),0);
model.angles=user.angles;
user linkto(model);
model moveTo(target, 1);
model waittill("movedone");
user unlink();
model delete();
}
}
Last edited by kat_; 5th March 2013 at 17:59.
Hey, you can add [php][/php] around your code to make it nice:
PHP Code:
jump = getEntArray("TRIGGER_NAME","targetname");
if(isDefined(jump))
for(kat=0;kat<jump.size;kat++)
jump[kat] thread bounceJump();
bounceJump()
{
target = getEnt("ORIGIN_NAME","targetname") getOrigin();
while(1)
{
self waittill("trigger", user);
model = spawn("script_model",(0,0,0));
model.origin=user.origin+(randomInt(90),randomInt(10),0);
model.angles=user.angles;
user linkto(model);
model moveTo(target, 1);
model waittill("movedone");
user unlink();
model delete();
}
}
timescale 0.01
Anyone able to know why this isn't working on cod4?
Doesn't give me any errors, just does bounce me in the position.
I tried putting "self iprintlnbold("test");" to see if it is using the thread and it shows, but bounces don't work.
This should work in COD4:
Just a couple of notes:PHP Code:
bounceJump()
{
target = getEnt( "ORIGIN_NAME", "targetname" );
while( 1 )
{
self waittill( "trigger", user );
if( isPlayer( user ) && user isTouching( self ) )
{
ent = spawn( "script_origin", (0,0,0) );
ent.origin = user.origin+( randomInt(90), randomInt(10), 0 );
ent.angles = user.angles;
user linkto( ent );
ent moveTo( target.origin, 1 );
wait( 1.5 );
user unlink();
ent delete();
}
}
}
1. In COD4 MP, the motion flag - waittill( "movedone" ) - does not work. Just put in a bog standard wait time.
2. If you are linking a player to a model in COD4, you have to set a model. Usually, the model "tag_origin" is used. This is already compiled into the stock fastfiles, just make sure you precache it. If you don't want to set a model, just use a script_origin.
kung foo man (15th May 2013),omnimouz (15th May 2013)
My script got "panzerschreck_mp" as weapon, you should replace it with some CoD4-weapon like "deserteaglegold_mp".
No clue if thats a real stock weapon, I just found that.PHP Code:
bounce( pos, power )
{
oldhp = self.health;
self.health = self.health + power;
self finishPlayerDamage( self, self, power, 0, "MOD_PROJECTILE", "deserteaglegold_mp", undefined, pos, "none", 0 );
self.health = oldhp;
}
timescale 0.01
Doesn't work eitherPHP Code:
bounce( pos, power )
{
oldhp = self.health;
self.health = self.health + power;
self finishPlayerDamage( self, self, power, 0, "MOD_PISTOL_BULLET", "deserteagle_mp", undefined, pos, "torso_upper"], 0 );
self.health = oldhp;
}
kung foo man (14th May 2013)