#Respawn Feature
1 messages · Page 1 of 1 (latest)
what do you mean by that?
what does ur code look like
would you like me to send a vid of the game
how is the game structured, and what do you want to respawn inside it? when, where?
what do you have written so far
https://gdl.space Post code via this
we're not just gonna write it for you
there are 6 rooms with traps inside and 2 enemies at the last 2 rooms, im looking to be able to respawn my player once he dies before completing the game (aka he fails to kill both the enemies)
what code would you like me to post there
i've been following an unfinished tutorial from youtube for this game, respawning is not a feature added thats why im lookign to add it
@worthy cradle
i've tried brackeys tutorial on it but it doesnt seem to work for me like it works for him
how many files of code are there?
Give us the names of the scripts
or just post all of them with a gdl.space link
respawning itself is easy, but how you implement it depends on the coding pattern of your project
all of my scripts?
that would be the best
(what have I done, lol)
that's all of them?
should be yes
Hmm,isnt there method to reload scene?
Just check if player is dead(you should have bool for it) and if he is just reload current scene...
MainMenu https://gdl.space/vimocapefu.cpp
CameraController https://gdl.space/bivoloduto.cs
SoundManager https://gdl.space/bosoneduni.cs
ArrowTrap https://gdl.space/usudubaces.cs
Enemy_Sidewayshttps://gdl.space/xahejatuno.cs
EnemyDamage https://gdl.space/ukodutubuq.cs
EnemyProjectile https://gdl.space/yeniwuqoho.cs
Firetrap https://gdl.space/gofiwezova.cs
Spikehead https://gdl.space/ecaquzazuz.cs
EnemyFireballHolder https://gdl.space/gowohociqo.cs
EnemyPatrol https://gdl.space/isawodinaq.cs
MeleeEnemy https://gdl.space/ejuvapafay.cs
RangedEnemy https://gdl.space/jusepibuye.cs
Health https://gdl.space/laqumolefe.cs
HealthBar https://gdl.space/rawedilaga.cs
HealthCollectible https://gdl.space/ozenemiwob.cs
PlayerAttack https://gdl.space/olecaruref.cs
PlayerMovement https://gdl.space/ukibebonaz.cs
Projectile https://gdl.space/tazosenoju.cs
Door https://gdl.space/xefayiseku.cs
Room https://gdl.space/ogocamohoz.cs
wipes sweat
is that script currently in working condition?
is the code there currently your attempt at making this feature?
I see Deactivate() but it's not called anywhere
if (!dead)
{
anim.SetTrigger("die");
GetComponent<PlayerMovement>().enabled = false;
dead = true;
SoundManager.instance.PlaySound(deathSound);
SceneManager.LoadScene(1);
adding the last line to this code does in fact reload the scene
good stuff
I don't think you need to deactivate the PlayerMovement script
seems redundant
i'll probably need to add a game over screen now to load to that screen instead
true it's not necessary to be honest
okay i think i'll be able to continue this on my own for now if i need any extra help i'll notify you guys
thanks
alright good luck