setting up a 2nd monster projectile

Post Reply
User avatar
red moon
Posts: 277
Joined: Mon Aug 12, 2019 12:19 am

setting up a 2nd monster projectile

Post by red moon » Tue Dec 03, 2019 4:48 pm

Hello,
I am looking for help on this specific situation. I am using the existing monster projectile to shoot left/right for some existing monsters (robed figures in this case) but wish to have a separate projectile that fires left only for the boss.
Each action is set to "shoot at player." If I create a new USER CONSTANT "OBJECT MONSTER 12" ...how do I set the monster object to use that constant instead of 11?

Thank you for taking the time to look at this.
Attachments
user.jpg
user.jpg (465.41 KiB) Viewed 246 times
shootleft.jpg
shootleft.jpg (506.66 KiB) Viewed 246 times
randomLR.jpg
randomLR.jpg (542.73 KiB) Viewed 246 times
User avatar
axbakk
Posts: 99
Joined: Thu Sep 26, 2019 9:17 pm
Location: Axvall, Sweden

Re: setting up a 2nd monster projectile

Post by axbakk » Tue Dec 03, 2019 6:55 pm

I just did like this...
copied the "ShootStraight" script and changed wich gameobject that should be created to my new "fireball". Then I saved it to "ShootStraight2.asm" and assigned it to a new AI Action Step (in my case number 13).
Looks like this:

Code: Select all

;; shoot fireball straight	
	TXA
	STA tempx
	LDA Object_movement,x
    AND #%00000111
    STA temp3
	TAY
    LDA DirectionMovementTable,y
    ORA temp3
	STA temp3
	;; get offset
    LDA Object_x_hi,x
    STA temp1
    LDA Object_y_hi,x
    STA temp2
	LDA Object_scroll,x
	STA temp
   CreateObject temp1, temp2, #$0B, #$00, temp
   
   PlaySound #SND_MONSTERSHOT
	
	LDA temp3
    STA Object_movement,x
	LDX tempx
Project Settings -----> Project Labels --------> Action Types = Change name of AI Behavior
Project Settings -----> Script Settings -------> AI Action ## = Assign script to speciffic behavior

Then you can assign that new AI Behavior to what ever you want. :D

Maybe it can be done on more easy way.. im not an expert of coding. :lol: if it is so, someone who knows a better way, please fill in. :)

Hope this helps.
Noobing around NESmaker just for fun! Totally noob in gamemaking and have no experience in programming! But I love retrogames! :D
User avatar
red moon
Posts: 277
Joined: Mon Aug 12, 2019 12:19 am

Re: setting up a 2nd monster projectile

Post by red moon » Wed Dec 04, 2019 2:09 am

Thanks Axbakk, I will look closely at the script and see if I have any luck. I have not used shoot straight yet....I was hoping to use "move left" for the objects behavior.
User avatar
dale_coop
Posts: 4476
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: setting up a 2nd monster projectile

Post by dale_coop » Wed Dec 04, 2019 2:01 pm

A small tip for your boss to shoot left...
because he doesn't move (no speed and no acceleration), just set the action step to "Move Left"... he will not move but he will have the left direction... then to the next axtion step you can do Shoot (he will always shoot at left... because your boss direction is now to left ;))

You could also modify your Shoot Straight script, to shoot a differnt object (based on a constant value, yeah) instead of the normal one, when the shooter is your "boss" monster.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
User avatar
axbakk
Posts: 99
Joined: Thu Sep 26, 2019 9:17 pm
Location: Axvall, Sweden

Re: setting up a 2nd monster projectile

Post by axbakk » Wed Dec 04, 2019 5:09 pm

If you set ”move left ” and ”shoot straight” as action steps. As dale says it will always shoot left. 😊
Noobing around NESmaker just for fun! Totally noob in gamemaking and have no experience in programming! But I love retrogames! :D
User avatar
red moon
Posts: 277
Joined: Mon Aug 12, 2019 12:19 am

Re: setting up a 2nd monster projectile

Post by red moon » Wed Dec 04, 2019 6:33 pm

That sounds like it i will work perfectly, thank you both! That is really helpful and gives me ideas for things that hang on ceiling that may shoot down or traps in pits that can shoot up!
User avatar
axbakk
Posts: 99
Joined: Thu Sep 26, 2019 9:17 pm
Location: Axvall, Sweden

Re: setting up a 2nd monster projectile

Post by axbakk » Wed Dec 04, 2019 7:22 pm

Glad i can give back and help a little. Not only ask for help. 😁 gr8 work with your game, looks really nice. 👍🏻
Noobing around NESmaker just for fun! Totally noob in gamemaking and have no experience in programming! But I love retrogames! :D
User avatar
dale_coop
Posts: 4476
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: setting up a 2nd monster projectile

Post by dale_coop » Thu Dec 05, 2019 8:32 am

Love the work you are doing, red moon, on your game. And also the ART WORKS! I hope you will release a manual with ALL those <3
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
User avatar
red moon
Posts: 277
Joined: Mon Aug 12, 2019 12:19 am

Re: setting up a 2nd monster projectile

Post by red moon » Thu Dec 05, 2019 3:43 pm

Thank you both! I've really enjoyed working on it and bouncing ideas off the community here. Its been a rewarding experience for sure.
I should do a retro style manual, that would be a great deal of fun and a label as well for the cart!
Post Reply