[Support] Move Slide Care Package to new Position?
-
Ducxy This still doesn't move or replace the first crate, which is literally the question that was asked. But I guess you can go this way.
-
NOXSYS said in Move Slide Care Package to new Position?:
How I can move my Slide Care Package to a new Position or delete the old Slide and Create a new one. So no one can abuse the Create Slide command?
Just make a delete function which deletes the model and kills the thread. Then let the player spawn in a new one:
self addTextOption(<menu>, "Bounce", self.hasBounce ? "^1Delete" : "^2Spawn", ::<functions>);
Something like that
-
Ducxy this code doesnt seem to work for me
-
I came up with a new script. It's basically a "Create/Move Slide" function; it will spawn a slide the first time you use it, and move it if you use the function again. Slides spawns/moves wherever you place your crosshair. There's no delete function, but you can just move it out of the map if you want it off the way.
- Call
manageSlides
in your menu. - Copy the following in your file :
manageSlides() { self endon("death"); self endon("disconnect"); start = self getTagOrigin("tag_eye"); end = anglestoforward(self getPlayerAngles()) * 1000000; slidePos = BulletTrace(start, end, true, self)["position"] + (0,0,15); slideAng = self getPlayerAngles(); if(!isDefined(self.slide)) { self.slide = spawn("script_model", slidePos); self.slide.angles = (0, slideAng[1] - 90, 70); self.slide setModel("t6_wpn_supply_drop_trap"); } else { self.slide RotateTo((0, slideAng[1] - 90, 70), 0.1, 0, 0 ); self.slide MoveTo(slidePos, 0.1, 0, 0 ); self.slide notify("restartSlideThink"); // Killing thread so it doesn't duplicate } self.slide thread slideThink(slidePos,slideAng); } slideThink(origin, angles) { self endon("restartSlideThink"); for(;;) { foreach(player in level.players) { if( distance(player.origin, origin) < 100 && player meleeButtonPressed() && player isMeleeing() && length(anglesXY(player getPlayerAngles() - angles)) < 90) { vec = anglesToForward(player.angles); for(i = 0; i < 10; i++) { player setVelocity(player getVelocity() + ( vec[0]*(50) , vec[1]*(50), 200 )); wait .01; } } } wait .1; } } anglesXY(angles) { return (angles[0], angles[1], 0); }
- Call
-
Sass Thanks, works great! Do u maybe know how i make the slides stronger?
-
Soccer1978 You'll have to edit this line. Change both "50" to something higher :
player setVelocity(player getVelocity() + ( vec[0]*(50), vec[1]*(50), 200 ));
-
Sass said in Move Slide Care Package to new Position?:
I came up with a new script. It's basically a "Create/Move Slide" function; it will spawn a slide the first time you use it, and move it if you use the function again. Slides spawns/moves wherever you place your crosshair. There's no delete function, but you can just move it out of the map if you want it off the way.
- Call
manageSlides
in your menu. - Copy the following in your file :
manageSlides() { self endon("death"); self endon("disconnect"); start = self getTagOrigin("tag_eye"); end = anglestoforward(self getPlayerAngles()) * 1000000; slidePos = BulletTrace(start, end, true, self)["position"] + (0,0,15); slideAng = self getPlayerAngles(); if(!isDefined(self.slide)) { self.slide = spawn("script_model", slidePos); self.slide.angles = (0, slideAng[1] - 90, 70); self.slide setModel("t6_wpn_supply_drop_trap"); } else { self.slide RotateTo((0, slideAng[1] - 90, 70), 0.1, 0, 0 ); self.slide MoveTo(slidePos, 0.1, 0, 0 ); self.slide notify("restartSlideThink"); // Killing thread so it doesn't duplicate } self.slide thread slideThink(slidePos,slideAng); } slideThink(origin, angles) { self endon("restartSlideThink"); for(;;) { foreach(player in level.players) { if( distance(player.origin, origin) < 100 && player meleeButtonPressed() && player isMeleeing() && length(anglesXY(player getPlayerAngles() - angles)) < 90) { vec = anglesToForward(player.angles); for(i = 0; i < 10; i++) { player setVelocity(player getVelocity() + ( vec[0]*(50) , vec[1]*(50), 200 )); wait .01; } } } wait .1; } } anglesXY(angles) { return (angles[0], angles[1], 0); }
I LOVE YOU
- Call
-
Sass Thanks alot <333
-
Sass how can i mind it bec when i do this it works but when they die they cant do it again
buttonMonitorSlides() { self endon("death"); self endon("disconnect"); for(;;) { if(self getStance() != "prone" && self actionslotthreebuttonpressed()) self manageSlides(); wait .05; } }
-
Duui YT said in [Support] Move Slide Care Package to new Position?:
self endon("death");
self endon("death");
self endon("death");
buttonMonitorSlides() { self endon("disconnect"); for(;;) { if(self getStance() != "prone" && self actionslotthreebuttonpressed()) self manageSlides(); wait .05; } }
Literally one line of code dude. Please read the code before posting on the forums
-
Cahz is it possible to make it spawn next to you intend at cross hair i cant finger it out
-
The
self endon("death");
is intentional. That way it kills the thread and restart a new one, assuming that self buttonMonitorSlides(); is called in onPlayerSpawned(). This prevents the function to restart over and over again. -
Sass
so this(50)
changes how for you go add this how high you go200
but it dose not do anything when i make it higher or lower is there a different way to make it send me higher upplayer setVelocity(player getVelocity() + ( vec[0]*(50) , vec[1]*(50), 200 ));