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
Printable View
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
I would like to help but I don't seem to understand your problem..can you explain it :D
i want make a room :P
With JUMP POWER (automatically jump) when you press spacer :D
Hey,
I made something as you wanted but I want it to be more good so I'll tell you tomorrow..
(I've installed the GD-module now, so we can use upload pictures to the forum now :D)
Preview-Test with 34FPS:
Attachment 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): -> Attachment 37 <-
-.- I wanted to do the same thing :D well then i'll do it in tutorials :D I have almost same script as kung but mine is opposite -.- 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 :D).
Yeah, would be nice for tutorial section :)
kung can you make half of power jump? its too high :D
Loveboy just remove some lines and that's all :)
Code:player bounce((0,0,1), 1000);
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<<<