Raised This Month: $ Target: $400
 0% 

Entity go though wall and but still trigger when touch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 01-09-2022 , 22:12   Re: Entity go though wall and but still trigger when touch
Reply With Quote #1

Quote:
Originally Posted by CrazY. View Post
I didn't understand your question. You want the rocket to explode when it hit objects in the world but it should not stop, instead, it will fly through the object as the spectators and will be removed when it flies out of the world "bounding box"? If so, set the entity move type to noclip as you first thought and constantly trace a monster hull. When the trace hits anything, create an explosion at the point of the collision. To determine if the entity is outside the world boundary, use CBaseEntity::IsInWorld, already implemented in engine_stocks.inc.

https://github.com/s1lentq/ReGameDLL...cbase.cpp#L856
https://github.com/alliedmodders/amx...tocks.inc#L225

If you want to prevent it from exploding if it is already within the object, check if it is the first time that the trace returns true (for that particular entity if isn't -1), may fail in some conditions but I think you will be ok. Pseudo-code:

Spoiler
Thank you, I will give it a try later on.
What I mean is "the rocket touch any surface or entity, it will explode. But instead of disappear, it go though that wall, explode when touch the next surface or entity"

For example:
- You stand above CT spawn (A short) in Dust2, you shoot under your feet, it will explode under your feet but also go though and explode in CT spawn.
- You stand behind the lower box that can see from Long A (usually used for silent C4) in A site. You facing the wall that face to the A site and shoot. It explode there but also go though and explode at B Window

Quote:
Originally Posted by Natsheh View Post
When you mean walls ? you mean entities or worldspawn walls
building walls, terrain, prop, entity,... All of them.
I want the entity to go though all of them but explode when it touch walls or entity. And then when it touch the skybox, remove it to prevent any crash might happened.

Quote:
Originally Posted by zXCaptainXz View Post
My bad I thought you meant everything but worldspawn, I have an idea in mind but I feel like it's difficult for me to implement and it's not very efficient
It is ok, thanks for helping out.

Quote:
Originally Posted by baneado View Post
Traceline, get all explosion origins and set delayed explosions with task or thinking
I was thinking about using Traceline so I don't have to using entity but I kind of stuck at thinking about when it get out of the walls/terrains to allow it touch and explode again.
__________________
My plugin:

Last edited by Celena Luna; 01-09-2022 at 23:36.
Celena Luna is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode