Henn64
Full Member
Look behind you >: )
Posts: 110
|
Post by Henn64 on Mar 2, 2013 22:02:46 GMT -5
Attempt at experimenting but this is not working:
Function Player_Action_Stomp(p.tPlayer, d.tDeltaTime) If (Player_Action_Jump = True And Input\Pressed\ActionB = True) Then p\Motion\Speed\x# = 0 p\Motion\Speed\z# = 0 p\Motion\Speed\y# = Cos(p\Animation\Direction#)*20
EndIf
If (p\Motion\Ground = True) Then p\Action = ACTION_COMMON EndIf End Function
Then, this jumpdash can be done unlimited times until you touch the ground but I have no idea how to only have it done once until p\Motion\Ground = True:
Function Player_Action_Jump(p.tPlayer, d.tDeltaTime) ; Variable jump If (Input\Hold\ActionA = False And p\Motion\Speed\y# > JUMP_STRENGHT_VARIABLE#) Then p\Motion\Speed\y# = JUMP_STRENGHT_VARIABLE# End If ; Land If (p\Motion\Ground = True) Then p\Action = ACTION_COMMON
; JumpDash If (Input\Pressed\ActionA = True) Then p\Animation\Animation = 3 p\Motion\Speed\x# = Sin(p\Animation\Direction#)*2.9 p\Motion\Speed\y# = 0 p\Motion\Speed\z# = -Cos(p\Animation\Direction#)*2.9 PlaySound(Sound_SpinDashRelease) End If End Function
Any help please?
|
|
|
Post by chaosshadic456 on Mar 3, 2013 1:09:13 GMT -5
with the stomp, just add a p\Motion\Speed\y# = 5.0. in the jumpdash section, you have to add a timer.
|
|
Henn64
Full Member
Look behind you >: )
Posts: 110
|
Post by Henn64 on Mar 4, 2013 15:29:39 GMT -5
Timer? [Edit]You sir, are talking/typing to a true n00b.
|
|
|
Post by chaosshadic456 on Mar 4, 2013 16:24:53 GMT -5
Timer like, a timer for make sonic go to action fall again. In the Game_Seetings.bb under Global Gameplay_Camera_RotationSpeedY# = 24 put this: Global HomingTimer = 1. and then in your jumpdash code put this: If (HomingTimer < MilliSecs()) Then p\Action = ACTION_FALL then in the jump action in the ; Jumpdash part put this: HomingTimer = MilliSecs() + 400 And done! You have your awesome, shitty and best jumpdash EVAR!!!
|
|
Henn64
Full Member
Look behind you >: )
Posts: 110
|
Post by Henn64 on Mar 5, 2013 20:39:20 GMT -5
NOPE The jumpdash still keeps going, and the stomp does not work either. Here is my code (both jd and stomp included): ; ========================================================================================================= ; Player_Action_Jump ; ========================================================================================================= Function Player_Action_Jump(p.tPlayer, d.tDeltaTime) ; Variable jump If (Input\Hold\ActionA = False And p\Motion\Speed\y# > JUMP_STRENGHT_VARIABLE#) Then p\Motion\Speed\y# = JUMP_STRENGHT_VARIABLE# End If ; Land If (p\Motion\Ground = True) Then p\Action = ACTION_COMMON
; JumpDash HomingTimer = MilliSecs() + 5 If (Input\Pressed\ActionA = True) Then p\Animation\Animation = 3 p\Motion\Speed\x# = Sin(p\Animation\Direction#)*2.9 p\Motion\Speed\y# = 0 p\Motion\Speed\z# = -Cos(p\Animation\Direction#)*2.9 PlaySound(Sound_SpinDashRelease) EndIf If (HomingTimer < MilliSecs()) Then p\Action = ACTION_COMMON End If End Function
; ========================================================================================================= ; Player_Action_Stomp ; =========================================================================================================
Function Player_Action_Stomp(p.tPlayer, d.tDeltaTime) p\Motion\Speed\y# = 5.0 If (p\Motion\Ground = False) And (Input\Pressed\ActionB = True) Then p\Motion\Speed\x# = 0 p\Motion\Speed\z# = 0 p\Motion\Speed\y# = Cos(p\Animation\Direction#)*20 EndIf
If (p\Motion\Ground = True) Then p\Action = ACTION_COMMON EndIf End Function
And Globals: ; /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ ; VARIABLES ; /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
; ---- Game global settings ---- Global GAME_TITLE$ = "Sonic the Hedgehog" Global GAME_WINDOW_W = 1024 Global GAME_WINDOW_H = 786 Global GAME_WINDOW_DEPTH = 0 Global GAME_WINDOW_MODE = 2 Global GAME_WINDOW_SCALE# = Float(GAME_WINDOW_W)/640.0 Global GAME_WINDOW_VSYNC = False
; ---- Gameplay global settings ---- Global Gameplay_Control_Mode = 0 Global Gameplay_Camera_Smoothness# = 0.7 Global Gameplay_Camera_TargetPOV = 0 Global Gameplay_Camera_RotationX# = 0 Global Gameplay_Camera_RotationY# = 0 Global Gameplay_Camera_RotationSpeedX# = 24 Global Gameplay_Camera_RotationSpeedY# = 24 Global HomingTimer = 1
HALP?
|
|
|
Post by chaosshadic456 on Mar 6, 2013 10:50:35 GMT -5
What did you did to your jumpdash? like this: ; JumpDash If (Input\Pressed\ActionA = True) Then HomingTimer = MilliSecs() + 400 p\Animation\Animation = 3 p\Motion\Speed\x# = Sin(p\Animation\Direction#)*2.9 p\Motion\Speed\y# = 0 p\Motion\Speed\z# = -Cos(p\Animation\Direction#)*2.9 PlaySound(Sound_SpinDashRelease) EndIf If (HomingTimer < MilliSecs()) Then p\Action = ACTION_FALL End If
Just copypaste this code.
|
|
Henn64
Full Member
Look behind you >: )
Posts: 110
|
Post by Henn64 on Mar 7, 2013 3:27:20 GMT -5
*sigh*
; ---- Game global settings ---- Global GAME_TITLE$ = "Sonic the Hedgehog" Global GAME_WINDOW_W = 1024 Global GAME_WINDOW_H = 786 Global GAME_WINDOW_DEPTH = 0 Global GAME_WINDOW_MODE = 2 Global GAME_WINDOW_SCALE# = Float(GAME_WINDOW_W)/640.0 Global GAME_WINDOW_VSYNC = True
; ---- Gameplay global settings ---- Global Gameplay_Control_Mode = 0 Global Gameplay_Camera_Smoothness# = 0.7 Global Gameplay_Camera_TargetPOV = 0 Global Gameplay_Camera_RotationX# = 0 Global Gameplay_Camera_RotationY# = 0 Global Gameplay_Camera_RotationSpeedX# = 24 Global Gameplay_Camera_RotationSpeedY# = 24 Global HomingTimer = 1
; ========================================================================================================= ; Player_Action_Jump ; ========================================================================================================= Function Player_Action_Jump(p.tPlayer, d.tDeltaTime) ; Variable jump If (Input\Hold\ActionA = False And p\Motion\Speed\y# > JUMP_STRENGHT_VARIABLE#) Then p\Motion\Speed\y# = JUMP_STRENGHT_VARIABLE# End If ; Land If (p\Motion\Ground = True) Then p\Action = ACTION_COMMON
; JumpDash If (Input\Pressed\ActionA) Then HomingTimer = MilliSecs() + 400 p\Animation\Animation = 3 p\Motion\Speed\x# = Sin(p\Animation\Direction#)*2.9 p\Motion\Speed\y# = 0 p\Motion\Speed\z# = -Cos(p\Animation\Direction#)*2.9 PlaySound(Sound_SpinDashRelease) EndIf If (HomingTimer < MilliSecs()) Then p\Action = ACTION_COMMON End If End Function
; ========================================================================================================= ; Player_Action_Stomp ; =========================================================================================================
Function Player_Action_Stomp(p.tPlayer, d.tDeltaTime) p\Motion\Speed\y# = 5.0 If (p\Motion\Ground = False) And (Input\Pressed\ActionB) Then p\Motion\Speed\x# = 0 p\Motion\Speed\z# = 0 p\Motion\Speed\y# = Cos(p\Animation\Direction#)*20 EndIf
If (p\Motion\Ground = True) Then p\Action = ACTION_COMMON EndIf End Function
Thanks for the help, but this really is not working... Also I won't make a fall action until stomp and jumpdash are done, so ACTION_COMMON is sort of a placeholder.
|
|
|
Post by chaosshadic456 on Mar 7, 2013 10:40:52 GMT -5
Just make another action: ACTION_JUMPDASH And put the If (HomingTimer < MilliSecs()) then p\Action = ACTION_COMMON into that action. for add a fall animation just put this under the speedlenght thing in player_animation.bb: if p\Motion\Speed\y# = o Then p\Animation\Animation = *fall animation number* Then good luck
|
|
Henn64
Full Member
Look behind you >: )
Posts: 110
|
Post by Henn64 on Mar 7, 2013 15:29:05 GMT -5
GRRR....
|
|
|
Post by chaosshadic456 on Mar 8, 2013 10:56:42 GMT -5
well, sorry.
heres my face book: Ian Moris
My messenger: chaosshadic456
find me and i'll help you fixing your engine.
|
|
Henn64
Full Member
Look behind you >: )
Posts: 110
|
Post by Henn64 on Mar 10, 2013 17:37:24 GMT -5
ok. BTW I'm not angry at you, I just get frustrated easily
|
|
|
Post by chaosshadic456 on Mar 10, 2013 19:54:37 GMT -5
no prob
|
|
r543
Relic Team
Posts: 408
|
Post by r543 on Mar 11, 2013 7:05:37 GMT -5
you probably didn't add the action in player.bb, every action needs to be added, at the top and at the bottom or it won't work
|
|
samcrossette
Relic Team
Advanced Coder,Stage Maker & Photoshoper
Posts: 427
|
Post by samcrossette on Mar 24, 2013 17:15:59 GMT -5
with the stomp, just add a p\Motion\Speed\y# = 5.0. in the jumpdash section, you have to add a timer. Just when I throught you couldn't be a worst coder than that...
|
|
|
Post by chaosshadic456 on Mar 24, 2013 18:35:10 GMT -5
with the stomp, just add a p\Motion\Speed\y# = 5.0. in the jumpdash section, you have to add a timer. Just when I throught you couldn't be a worst coder than that... Shut up.
|
|