Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: [Tut-Request] Jump-Pad

  1. #1
    Corporal STAUFFi's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    269
    Thanks
    106
    Thanked 128 Times in 83 Posts

    [Tut-Request] Jump-Pad


    Hey Guys, i need Help ...

    I want make a Jump Room
    on a Texture in the JUmp Room i can there automatically.
    Kung told me i need a trigger and so ?
    How i can create it ??
    KUNG PLS MAKE A TUT FOR ME AND OTHER PEOPLE :P

  2. The Following User Says Thank You to STAUFFi For This Useful Post:

    jumper{run} (24th October 2012)

  3. #2
    Corporal Killer.Pro's Avatar
    Join Date
    Jul 2012
    Location
    belgium
    Posts
    274
    Thanks
    102
    Thanked 213 Times in 141 Posts
    I would like to help but I don't seem to understand your problem..can you explain it
    Please call me Killer.Pro

  4. #3
    Corporal STAUFFi's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    269
    Thanks
    106
    Thanked 128 Times in 83 Posts
    i want make a room :P
    With JUMP POWER (automatically jump) when you press spacer

  5. #4
    Corporal Killer.Pro's Avatar
    Join Date
    Jul 2012
    Location
    belgium
    Posts
    274
    Thanks
    102
    Thanked 213 Times in 141 Posts
    Hey,
    I made something as you wanted but I want it to be more good so I'll tell you tomorrow..
    Please call me Killer.Pro

  6. The Following User Says Thank You to Killer.Pro For This Useful Post:

    kung foo man (24th October 2012)

  7. #5
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    (I've installed the GD-module now, so we can use upload pictures to the forum now )

    Preview-Test with 34FPS:

    Click image for larger version. 

Name:	jumpjump.jpg 
Views:	138 
Size:	112.3 KB 
ID:	36

    mp_jumppad.gsc

    Code:
    bounce( pos, power )
    {
        oldhp = self.health;
        self.health = self.health + power;
        self finishPlayerDamage( self, self, power, 0, "MOD_PROJECTILE", "panzerschreck_mp", undefined, pos, "none", 0 );
        self.health = oldhp;
    }
    
    jumppad_think()
    {
        jumppad = self;
        while (1)
        {
            jumppad waittill("trigger", player);
    
            if (!isDefined(player.lastJump))
                player.lastJump = 0;
    
            //iprintlnbold(getTime() - player.lastJump);
            if (getTime() - player.lastJump <= 1000)
            {
                wait 0.05;
                continue;
            }
            player.lastJump = getTime();
    
            player iprintlnbold("^1~^7JUMP^1~");
            player bounce((0,0,1), 1000);
            player bounce((0,0,1), 1000);
            player bounce((0,0,1), 1000);
            player bounce((0,0,1), 1000);
            player bounce((0,0,1), 1000);
            player bounce((0,0,1), 1000);
            wait 0.05;
        }
    }
    
    initJumppads()
    {
        jumppads = getEntArray("jumppad", "targetname");
        for (i=0; i<jumppads.size; i++)
            jumppads[i] thread jumppad_think();
    }
    
    main()
    {
        initJumppads();
    }


    mp_jumppad.map
    as attachment

    The IWD (only maps/mp/mp_jumppad.d3dbsp): -> mp_jumppad.iwd <-
    Attached Files Attached Files
    timescale 0.01

  8. The Following 2 Users Say Thank You to kung foo man For This Useful Post:

    ASAS1NS (24th October 2012),STAUFFi (24th October 2012)

  9. #6
    Corporal Killer.Pro's Avatar
    Join Date
    Jul 2012
    Location
    belgium
    Posts
    274
    Thanks
    102
    Thanked 213 Times in 141 Posts
    -.- I wanted to do the same thing well then i'll do it in tutorials I have almost same script as kung but mine is opposite -.- isn't it upside down kung?
    Last edited by Killer.Pro; 25th October 2012 at 04:27.
    Please call me Killer.Pro

  10. #7
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Quote Originally Posted by prokiller View Post
    isn't it upside down kung?

    You mean, you have main() on top? I guess thats an old habit made by C/C++ for me. There you can do:
    - either write the used functions before they are actually used
    - or predefine functions, so the compiler already knows about them (will result in extra-code, I try to circumvent that (only do it for external code))

    codscript is "only" a scripting-engine, so it doesnt care about the order. But I guess it is also nice for the reading human: he will know about a function, which is called later (just a guess ).


    Yeah, would be nice for tutorial section
    timescale 0.01

  11. #8
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts
    kung can you make half of power jump? its too high

  12. #9
    Private First Class
    Join Date
    Dec 2012
    Posts
    127
    Thanks
    132
    Thanked 114 Times in 63 Posts
    Loveboy just remove some lines and that's all

    Code:
    player bounce((0,0,1), 1000);

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

    kung foo man (14th January 2013)

  14. #10
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    straight up:
    dir = ( 0 , 0 , 1 );
    define a dir and jump in the desired direction:
    dir = vectorNormalize( jumppad.dir_obect.origin - jumppad.origin );
    would look like (teddy = jumppad.dir_obect ):>>>VIDEO<<<

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

    kung foo man (15th January 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
  •