Jump to content

Photo

Detecting if the given FFC ghosts given enemy

ghost.zh sideview

  • Please log in to reply
3 replies to this topic

#1 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 11 November 2021 - 05:24 AM

Next in development plan is solid Thwomp that can push and crush anything in his path. The problem is the moment I render FFC solid, it crushes ghosted enemy immediately. Solid FFC collision is handled by engine`s global script. Is there a way to prevent ghosted enemy from being pushed/killed by his master FFC, while preserving collision with other enemies?

//Returns true, if given FFC ghosts given NPC.
bool FFCGhostsNPc(ffc f, npc n){
}

ZC 2.53.1 beta 55.



#2 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 11 November 2021 - 06:43 PM

Believe this would require modifying ghost to make the link between enemy and FFC visible to other scripts. Generally speaking this is considered a bad move if you're releasing the thing publicly. You could also modify the solid objects script to give each object a "whitelist NPC" pointer. This would require either another global array in 2.53 or making the existing one untyped/using UIDs in 2.55. Once again this isn't exactly a perfect solution as it'd require modifying an existing script component and prevent your package from receiving any future updates to those components. But my solid objects script is less likely to get an update than ghost.zh.



#3 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 11 November 2021 - 07:08 PM

Question: Why does the thwomp.... need to be an enemy at all? Why not just make it an ffc script?



#4 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 12 November 2021 - 02:24 AM

Question: Why does the thwomp.... need to be an enemy at all? Why not just make it an ffc script?

So it can be killed like an enemy, for instance by hitting him with Megaton Hammer, frozen by a clock etc. And enemies in 2.53.1 have 10 attibutes, as opposed to 8 of generic FFC.





Also tagged with one or more of these keywords: ghost.zh, sideview

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users