Collision detection

  • Thread starter Thread starter ADNORM
  • Start date Start date
A

ADNORM

Guest
I am working on a unit ability for knights that allows them to trample ground units, but I have encountered two problems:
1) I turned off collision for the knights so that they walk through instead of around other units, but I want them to still treat walls as solids.
2) I am having trouble detecting collision from the front only. When a knight passes to the side of a unit it shouldn't kill it.

I haven't given much thought to problem #1, but here's what I have so far for #2:
Code:
Trample:
     Events
          Unit - A unit comes within 128.00 of Knight 0000 <gen>
     Conditions
    And - All (Conditions) are true
        Conditions
            (Entering unit) Not equal to Knight 0000 <gen>
            ((Angle from (Position of Knight 0000 <gen>) to (Position of (Entering unit))) Greater than or equal to ((Facing of Knight 0000 <gen>) - 15.00)) and ((Angle from (Position of Knight 0000 <gen>) to (Position of (Entering unit))) Less than or equal to ((Facing of Knight 0000 <gen>) + 15.00))
     Actions
    Unit - Kill (Entering unit)
For those of you too lazy to scroll to the right, the condition specifies that the angle between the knight and the entering unit be between +15 and -15 of the knights facing angle.

The problem I still have is that the trigger only kills the unit sometimes, other times the knight walks right through them and they dont die. Any thoughts?
 
Well you dont need that all there, conditions are 'ALL' by default. Why 15? 30 degrees of death? This probrably wont solve the problem but change it to 22.5 so its 45 degrees
 
I think you can remove "(Entering unit) Not equal to Knight 0000 <gen>
" but im not sure. Is there only one knight? Or are you going to make it so any knight can do that?

1. Have you tested if they walk though walls? Well even colision 0 isnt no colsion...there is a mathamatical singurlarity they occupy even though its realy tiny... so a long object should still stop them.
2. well... it may just be that no dection system is perfect and you are going to need to live with it... my idea is to make the area bigger so theres more space for the unit to die in and mabey that will help, 30 degrees is small.
 
Good call!

I'm still having trouble keeping the knight from going through a wall though (I didn't actually set collision to 0, i turned it off completely with a trigger), I also don't think it should go through other knights. I'm probably going to use the action:
If (Entering unit not equal to knight) AND (Unit type of Entering unit not equal to structure)
Then- kill Entering unit
Else- Turn collision off for knight0000
the problem will be, when should I turn collision back on?
also, trees are not units, so knights could still run through those
 
why did you set collosion to 0? since any unit it "tramples" is dead before it gets to it, it already will go right over it.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper
  • Stephen Stephen:
    Oh no - please don't lose the Nuon content
    +1
  • The Helper The Helper:
    Someone email AtariAge and see if they want me to transfer the forum data over to it
  • Ghan Ghan:
    Could probably keep NUON stuff around here if we wanted.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.
  • A Andyoyo:
    Thank you for the hard work over the years. It did not go unnoticed.

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top