Create Projectile doesn't work in platform module?

User avatar
dale_coop
Posts: 1618
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Create Projectile doesn't work in platform module?

Post by dale_coop » Tue Dec 04, 2018 11:41 pm

No, only in the PlatformGame_Base\HurtWinLoseDeath\Platform_HandleHurtMonster.asm script.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE
User avatar
ZeGGamer1
Posts: 42
Joined: Thu Nov 29, 2018 11:26 pm

Re: Create Projectile doesn't work in platform module?

Post by ZeGGamer1 » Wed Dec 05, 2018 4:00 am

Still nothing.

I'm sorry that this is taking so much work, you have been really helpful though so I appreciate it.
User avatar
dale_coop
Posts: 1618
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Create Projectile doesn't work in platform module?

Post by dale_coop » Wed Dec 05, 2018 7:05 am

Could you share the content of the HandleHurtMonster.asm script ? I could verify if there is something I can fix.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE
User avatar
ZeGGamer1
Posts: 42
Joined: Thu Nov 29, 2018 11:26 pm

Re: Create Projectile doesn't work in platform module?

Post by ZeGGamer1 » Wed Dec 05, 2018 2:34 pm

;;; what should we do with the monster?
;;; monster is loaded in x
LDA Object_vulnerability,x
AND #%00000100 ;; is it weapon immune?
BEQ notWeaponImmune
PlaySound #SFX_MISS
JMP skipHurtingMonsterAndSound
notWeaponImmune:

LDA Object_status,x
AND #HURT_STATUS_MASK
BEQ dontskipHurtingMonster
JMP skipHurtingMonster
dontskipHurtingMonster:
LDA Object_status,x
ORA #%00000001
STA Object_status,x
LDA #HURT_TIMER
STA Object_timer_0,x
;;; assume idle is in step 0
ChangeObjectState #$00,#$02
;;;; unfortunately this recoil is backwards
LDA Object_status,x
AND #%00000100
BNE skipRecoilBecauseOnEdge
LDA Object_vulnerability,x
AND #%00001000
BNE skipRecoilBecauseOnEdge ;; skip recoil because bit is flipped to ignore recoil

LDA selfCenterX
STA recoil_otherX
LDA selfCenterY
STA recoil_otherY
LDA otherCenterX
STA recoil_selfX
LDA otherCenterY
STA recoil_selfY
JSR DetermineRecoilDirection
skipRecoilBecauseOnEdge:
LDA Object_health,x
SEC
SBC #$01
CMP #$01
BCS notMonsterDeath
DeactivateCurrentObject

;;;;;;;;;;;;;;;;;; ok, so now we also add points to score
;LDY Object_type,x
;LDA ObjectWorth,y
;STA temp
; AddValue #$03, GLOBAL_Player1_Score, temp
;arg0 = how many places this value has.
;arg1 = home variable
;arg2 = amount to add ... places?
;; and this should trip the update hud flag?

;;;;

; LDA #$05 ;; amount of score places?
; STA hudElementTilesToLoad
; LDA DrawHudBytes
; ORA HUD_updateScore
; STA DrawHudBytes

JSR HandleDrops


JMP skipHurtingMonster
notMonsterDeath
STA Object_health,x
skipHurtingMonster:
;; PlaySound #SFX_MONSTER_HURT

skipHurtingMonsterAndSound:
LDX tempx
;; what should we do with the projectile?
DeactivateCurrentObject
INC limitProjectile ;;projectiles limitation related
User avatar
dale_coop
Posts: 1618
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Create Projectile doesn't work in platform module?

Post by dale_coop » Wed Dec 05, 2018 3:52 pm

Your script looks good (exactly like mine). Strange... You still have the game freezing up when the projectile hit an enemy?
And when you didn't have the "limitProjectile" related modifications in your scripts, your game was not freezing?
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE
User avatar
ZeGGamer1
Posts: 42
Joined: Thu Nov 29, 2018 11:26 pm

Re: Create Projectile doesn't work in platform module?

Post by ZeGGamer1 » Wed Dec 05, 2018 4:29 pm

Yes it wouldn't freeze. Then again, It was using the Meele object and not the projectile one so that might mean something.
User avatar
dale_coop
Posts: 1618
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Create Projectile doesn't work in platform module?

Post by dale_coop » Wed Dec 05, 2018 5:00 pm

ZeGGamer1 wrote:
Wed Dec 05, 2018 4:29 pm
Yes it wouldn't freeze. Then again, It was using the Meele object and not the projectile one so that might mean something.
Could you check your projectile? is it correctly set (monster's weapon, bounding box, etc... )
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE
User avatar
ZeGGamer1
Posts: 42
Joined: Thu Nov 29, 2018 11:26 pm

Re: Create Projectile doesn't work in platform module?

Post by ZeGGamer1 » Wed Dec 05, 2018 5:11 pm

Wait, does it need to be a monster weapon? I was using a player weapon?

I don't have access to my computer at the moment so that is why I'm asking.
User avatar
dale_coop
Posts: 1618
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Create Projectile doesn't work in platform module?

Post by dale_coop » Wed Dec 05, 2018 7:18 pm

Ah ah, no ;) of course, I wanted to write « player weapon ».
But yeah should check that all your projectile’s details are ok.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE
User avatar
ZeGGamer1
Posts: 42
Joined: Thu Nov 29, 2018 11:26 pm

Re: Create Projectile doesn't work in platform module?

Post by ZeGGamer1 » Thu Dec 06, 2018 4:13 am

Nope, they have the same object details.
Post Reply