Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 29

Thread: [Tut-Request] Jump-Pad

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private First Class Earliboy's Avatar
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    130
    Thanks
    5
    Thanked 88 Times in 61 Posts
    Its may an idea to remove the Damagefeedback at this part (red screen). Would look more "realistic" (ye, jump pad - realistic nvm).
    No ... No ... this is not possible .......

  2. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,018
    Thanks
    2,110
    Thanked 1,086 Times in 753 Posts
    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

  3. #3
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    mhh, its a beta xf video url: http://beta.xfire.com/videos/5d5d6e
    maybe classic xf:http://classic.xfire.com/video/5d5d6e/

  4. The Following User Says Thank You to serthy For This Useful Post:

    kung foo man (15th January 2013)

  5. #4
    Private
    Join Date
    Mar 2013
    Posts
    12
    Thanks
    2
    Thanked 6 Times in 5 Posts
    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[katthread 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(target1);
            
    model waittill("movedone");
            
    user unlink();
            
    model delete();
        }

    Last edited by kat_; 5th March 2013 at 17:59.

  6. #5
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,018
    Thanks
    2,110
    Thanked 1,086 Times in 753 Posts
    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[katthread 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(target1);
            
    model waittill("movedone");
            
    user unlink();
            
    model delete();
        }

    timescale 0.01

  7. #6
    Private
    Join Date
    May 2013
    Posts
    21
    Thanks
    5
    Thanked 2 Times in 2 Posts
    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.

  8. #7
    Brigadier General
    Join Date
    Oct 2012
    Posts
    998
    Thanks
    20
    Thanked 590 Times in 390 Posts
    Quote Originally Posted by omnimouz View Post
    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:

    PHP Code:
    bounceJump()
    {
        
    target getEnt"ORIGIN_NAME""targetname" );
        
        while( 
    )
        {
            
    self waittill"trigger"user );
            
            if( 
    isPlayeruser ) && user isTouchingself ) )
            {
                
    ent spawn"script_origin", (0,0,0) );
                
    ent.origin user.origin+( randomInt(90), randomInt(10), );
                
    ent.angles user.angles;
                
    user linktoent );        
                
    ent moveTotarget.origin);
                
    wait1.5 );
                
    user unlink();
                
    ent delete();
            }
        }

    Just a couple of notes:

    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.

  9. The Following 2 Users Say Thank You to Tally For This Useful Post:

    kung foo man (15th May 2013),omnimouz (15th May 2013)

  10. #8
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,018
    Thanks
    2,110
    Thanked 1,086 Times in 753 Posts
    My script got "panzerschreck_mp" as weapon, you should replace it with some CoD4-weapon like "deserteaglegold_mp".


    PHP Code:

    bounce
    pospower )
    {
        
    oldhp self.health;
        
    self.health self.health power;
        
    self finishPlayerDamageselfselfpower0"MOD_PROJECTILE""deserteaglegold_mp"undefinedpos"none");
        
    self.health oldhp;

    No clue if thats a real stock weapon, I just found that.
    timescale 0.01

  11. #9
    Private
    Join Date
    May 2013
    Posts
    21
    Thanks
    5
    Thanked 2 Times in 2 Posts
    PHP Code:
    bouncepospower )
    {
        
    oldhp self.health;
        
    self.health self.health power;
        
    self finishPlayerDamageselfselfpower0"MOD_PISTOL_BULLET""deserteagle_mp"undefinedpos"torso_upper"], );
        
    self.health oldhp;

    Doesn't work either

  12. #10
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    Quote Originally Posted by omnimouz View Post
    PHP Code:
    bouncepospower )
    {
        
    oldhp self.health;
        
    self.health self.health power;
        
    self finishPlayerDamageselfselfpower0"MOD_PISTOL_BULLET""deserteagle_mp"undefinedpos"torso_upper"], );
        
    self.health oldhp;

    Doesn't work either
    1. your sMeasnOfDeath "MOD_PISTOL_BULLET" needs to be one of them: MOD_PROJECTILE MOD_PROJECTILE_SPLASH MOD_GRENADE MOD_GRENADE_SPLASH
    2. syntax error: "torso_upper"]

  13. The Following User Says Thank You to serthy For This Useful Post:

    kung foo man (14th May 2013)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •