#need helping dealing damage to
1 messages · Page 1 of 1 (latest)
you still have not actually provided any sense of detail or context required to help you
Photos of the scene and maybe !code snippets for what you have towards this damage handling
📃 Large Code Blocks
Use links to services like:
https://paste.mod.gg/, https://hastebin.skyra.pw/, https://paste.ofcode.org/, https://paste.myst.rs/
📃 Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
you are asking for too many things at the same time, try to go one by one
alright
ok
i download the bandit asset and im now trying to make the two charectors deal damage to eachother
thats my main purpose
i had some but then deleted all since there was an error which was not going away but i do have basic movements and attak monvement too which deals no damage to anything
can i get a response?
you need to provide some code or ask more precisely
what code u need the movement code i did not start coding for the damage sector
just something you need help with
i feel like you are really new to unity and you don´t exactly know what to do and where to start
i need help with making the charectors damage eachother
just downloaded it today
!learn
:teacher: Unity Learn ↗
Over 750 hours of free live and on-demand learning content for all levels of experience!
not that bro
yeah so plese start learning instead, this does not make any sense now
im close to finishing the game just need to make the charector damage eacother
no like i have the charectors set up and moving just need to damage
we have no clue what your game looks like not even if 2d or 3d
u want ss?
this is the game
put a collider (isTrigger) on the weapons and listen for the OnTrigger2D event
this would be the easiest and most basic method to do
componenet?
If this is literally your first day using Unity you should be doing that instead of whatever you're currently doing
component?
well not first like 2 yrs ago i made flappy bird
yeah you need to learn the basics of unity
aight after this game bro
Nah you might wanna sleep learn the basics than get back to this game bro
i dont have time bro
i ran out out it
why
i got a comp science exhibition
And when did you start this game that you have no time left for?
and i said i would do a 2d fighting game
Man awfully shitty of them to send you that assignment at 4 AM the night before
someone oughta tell them to give people more time
i thought it would take like 2 hrs
nah i have to preasent the game tmwr thats it
Yeah but when did you start? And when where you informed of this exhibition
You thought incredibly wrong
4 days ago
i had a lot of work so i thought i would do today
And yet you just installed Unity today. Curious.
also i put a box collider on the swords
now what
yeah not a great idea (spent like an hour and a half making this and i've spent the last year using unity)https://cdn.discordapp.com/attachments/1332790620758212629/1391987317107069008/20250708-0340-17.2274057.mp4?ex=688a3cf6&is=6888eb76&hm=89d7e7c15dce80b261bcd236ee3c59c4f5bffa17702f01059111e0d5fec8ba77&
set it to a trigger
Hell four days isn't really enough time to make a decent 2D fighting game, I wouldn't even try to do that in the time limit provided
did
honestly i set a bar high
and add a script that has a function called OnTriggerEnter2D
to the componenet with box collider ryt
note, not sure how you plan to handle animations but this wouldn't have the sword move unless you already got that
already got animations
when i clcik the key for attak it plays it
in the Ontrigger make it check if it's the enemy by using a if statement and call a function that the enemy has that removes some of it's health
also in update or start area?
none
a function / method go in the class outside of other functions like start or update, and below the declared variables
!code
📃 Large Code Blocks
Use links to services like:
https://paste.mod.gg/, https://hastebin.skyra.pw/, https://paste.ofcode.org/, https://paste.myst.rs/
📃 Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
if it is the enemy get a component from it https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Component.GetComponent.html and in that component have a function that takes away health