#my game has become screwed up

1 messages ยท Page 1 of 1 (latest)

sly oasis
#

I've been working on a space invaders like game on Unity 2d for the past month, and at this stage it is completely screwed up at least for me, bullets aren't coming from the enemy, attempts to make bullets fire on repeat aren't going through, a scoreboard which I tried to add has not been working properly, and despite constant attempts at fixing it, the problem are still persisting iโ€™ll post the scripts that are currently in my game

young pelican
#

Focus on one problem at a time

red apex
#

holy files

#

!code

lusty horizonBOT
sly oasis
#

Links aren't working but I will try

red apex
sly oasis
#

is this some automatic code fixing tool? i was hoping someone would actually look at it themselves

red apex
#

so we can refer to line numbers, or use Find tools, etc

sly oasis
#

Understood

red apex
#

also as praetor mentioned, focus on one issue at a time. you know the overall picture of your code better than us - show the code that's relevant for one specific issue, once that's dealt with, go on to the next issue

that'll make it easier for us to help rather than posting a lot of code and a lot of issues at the same time

sly oasis
#

is that good?

red apex
#

you were supposed to post links

#

did you press save like, in your browser lol?

#

to be clear, the point is to not send files

sly oasis
#

ok links got it

red apex
#

for that site, it's the "create paste" button
then you should have a unique link in your browser url bar

#

don't stress it, there's a first for everything lol

sly oasis
#

I appreicate the support

red apex
#

right so which issue do you want to work on first

sly oasis
#

the enemy bullet script is a good start

red apex
#

right but what's the issue you want to start on

#

also i'm not seeing where the enemy fires?

sly oasis
#

i though i had included a video showing the game in action

#

Are you talking about the enemy bullet script?

red apex
#

i mean in the scripts, i shouldve specified

#

i'm only seeing 2 Instantiate calls, one for the player shooting, one for spawning enemies, so there doesn't seem to be anywhere the enemy actually shoots?

sly oasis
#

and you're reading the EnemyBullet one

#

is that correct

red apex
#

enemybullet would be for moving the bullet, wouldn't it? it wouldn't be responsible for spawning bullets

sly oasis
#

So are you saying I'm missing a script

red apex
#

well, if bullets are supposed to come from the enemies, then yeah

#

nothing's doing that

#

could just be part of Enemy, wouldn't necessarily need to be a separate script

sly oasis
#

Ok that's important to know

#

I should say that a majority of these scripts are automatically generated, something I realized early on could be problematic, tracking down the incorrections made to some of these scripts is a hassle.

red apex
#

yeah stay away from AI while learning lol. it's not going to help learning, you need experience that you don't yet have to actually properly use it as a tool (though personally i don't see the value)

sly oasis
#

While we are on the topic the script that supposedly would lead to my characters taking damage I assume is also incorrect.

red apex
#

the PlayerDamageTest/Enemy?

#

using tags can be a bit fragile (consider layers instead), but they seem about right. do they not work?

sly oasis
#

Unfortunely no

red apex
#

how are they not working? are you getting errors, any logs, weird behavior, or no behavior at all?

#

well you are getting several errors and warnings in the video, perhaps fix those first