SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Editing > Editing Help

Thread Tools Search this Thread
Old 06-10-2015   #1
Oh, THAT Youtuber...
SSG3's Avatar
Default Instant Forward momentum & Scaling to the player's current size problem...

I've got a problem with getting momentum under control. My "Metroid Sonic" has a screw attack that, when custom 2 is pressed after a jump, is supposed to bring him upward AND forward at the same time. Currently it only makes him go upwards. What variable should I use?

Here's an extract of the code:
Originally Posted by SSG3 View Post
if not (P_IsObjectOnGround( and (player.jumping)
			and (player.canscrew ~= 2)
			and (player.isscrewing ~= 2)
			and (player.screwjumps ~= 5)
			and (player.screwjumping)
			and not (player.spectator)
			and not (player.pflags & PF_NIGHTSMODE)
			and not ( and == MT_TUBEWAYPOINT)
			and not ( == S_PLAY_DIE) then
				if ( & MFE_UNDERWATER)
					P_SetObjectMomZ(, 5*FRACUNIT, false)
					P_SetObjectMomZ(, 10*FRACUNIT, false)
				S_StartSound(, sfx_fre800)
				player.screwjumps = $1 + 1
				player.isscrewing = 1
				if player.screwjumps >= 5
					player.canscrew = 2
					player.isscrewing = 2
				player.stillscrewing = true
			if (player.stillscrewing == true)
If P_INSTATHRUST has to be used and I want it to make the player, at whatever speed or momentum they've gained, go at 20 FASTS/H constantly, where should I place it at?
Any answers would be very helpful.
<Lat'> people thought moonjump and chaos control were OP
<Lat'> screw jump is the new meta
SSG3 is offline   Reply With Quote
Old 06-10-2015   #2
Absolute territory where
Lat''s Avatar

P_InstaThurst can make your player go forward, P_Thrust does it too.
Check on the wiki, but as far as I remember, P_InstaThrust(, <value>*FRACUNIT) should work.

EDIT: My bad, I didn't read the whole thing.
Place it right under (or over) the thing that makes it goes upward, I guess.
Originally Posted by MADVAL2 View Post
glad there is no Zero Two in this pack,i really get mad everytime i see Zero Two

Last edited by Lat'; 06-10-2015 at 05:00 PM.
Lat' is offline   Reply With Quote
Old 06-10-2015   #3
Watch Symphogear
wolfs's Avatar

Originally Posted by "Lat'" View Post
Check on the wiki, but as far as I remember, P_InstaThrust(, <value>*FRACUNIT) should work.
Close, but not quite. In this case it should be P_InstaThrust(,, x*FRACUNIT).
[23:56:36] <SM-MaxX> prisma illya is a gift to this impure earth and a shining beacon for all anime
wolfs is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 06:17 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.