SRB2 Message Board  

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

Reply
 
Thread Tools Search this Thread
Old 06-10-2015   #1
SSG3
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:
Quote:
Originally Posted by SSG3 View Post
Code:
if not (P_IsObjectOnGround(player.mo)) 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 (player.mo.tracer and player.mo.tracer.type == MT_TUBEWAYPOINT)
			and not (player.mo.state == S_PLAY_DIE) then
				if (player.mo.eflags & MFE_UNDERWATER)
					P_SetObjectMomZ(player.mo, 5*FRACUNIT, false)
				else
					P_SetObjectMomZ(player.mo, 10*FRACUNIT, false)
					end
				S_StartSound(player.mo, sfx_fre800)
				player.screwjumps = $1 + 1
				player.isscrewing = 1
				if player.screwjumps >= 5
					player.canscrew = 2
					player.isscrewing = 2
				end
				player.stillscrewing = true
			end
			
			if (player.stillscrewing == true)
				P_SpawnGhostMobj(player.mo)
			end
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.
__________________
Quote:
<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
Lat'
Absolute territory where
 
Lat''s Avatar
Default

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(player.mo, <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.
__________________
Quote:
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
wolfs
Watch Symphogear
Developer
 
wolfs's Avatar
Default

Quote:
Originally Posted by "Lat'" View Post
Check on the wiki, but as far as I remember, P_InstaThrust(player.mo, <value>*FRACUNIT) should work.
Close, but not quite. In this case it should be P_InstaThrust(player.mo, player.mo.angle, x*FRACUNIT).
__________________
Quote:
[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
Reply

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.