Need help with collisions with spawn objects SB 3ds
#1✎ 11ninja12Night PersonI like the quiet night and sleep late.Express YourselfDrawingI like to draw!HobbiesVideo GamesI like to play video games!HobbiesHello Im trying to get a working combat system going. I was able to have my player hit an enemy with an hp spvar with a spawned hit box sprite, after 4 hits he's defeated but I since changed the code to spawn an enemy at startup using Def. and the spawned hit box is also added using a Def. but now the enemy is not sensing the collision from the hit box.
Any help would be appreciated thanks
Posted
#2✎ 412MZ952Intermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteReadingI like to read books!HobbiesCan you post a key to the program?
Posted
#3✎ 11ninja12Night PersonI like the quiet night and sleep late.Express YourselfDrawingI like to draw!HobbiesVideo GamesI like to play video games!HobbiesThanks for the reply, but I figured it out. I had to rewrite the code and work on the collision.
A question though. I have a Def that handles the hit damage now when the hp reaches 0 and the enemy needs to be cleared after few seconds. Should I have a separate def function, to handle that?
Thanks
Posted
Edited
by ninja12
#4✎ 412MZ952Intermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteReadingI like to read books!HobbiesWell, personally, I like to create functions that serve unique objectives. Like, one function for spawning enemies, one function for handling damage dealt against enemies, one function for killing/despawning enemies, and so on.
I wouldn't say there's a rule of thumb on the matter, just use whatever layout works for you.
Posted
#5✎ 11ninja12Night PersonI like the quiet night and sleep late.Express YourselfDrawingI like to draw!HobbiesVideo GamesI like to play video games!HobbiesI think I like that approach thanks.
Posted