AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [REQUEST] Entity triggering (https://forums.alliedmods.net/showthread.php?t=45401)

Silencer123 10-01-2006 14:45

[REQUEST] Entity triggering
 
I suggest a public function which is triggered
when an entity is being triggered by another entity.
This can be Entity -> Entity and Player -> Entity.
Code:
public entity_action(ent,victim_ent,start_ent,type) { }
'ent' shall be the entity which triggers another entity.
'victim_ent' shall be the triggered entity.
'start_ent' shall be the entity that started the triggering chain.
'type' is triggering type. (Toggle, On, Off, Kill Target / 0, 1, 2, 3)
For example if a Player (ID 7) presses a Button (ID 143) we should get this:
Code:
ent=7 victim_ent=143 start_ent=7 type=0
Lets say the Buttons target is 'my_func_door' which is a
func_foor (ID 231) and the Button has delay of 1 Second,
we will get this 1 Second after the Player pressed the Button:
Code:
ent=143 victim_ent=231 start_ent=7 type=0
etc. ...

toazron1 10-01-2006 16:17

Re: [REQUEST] Entity triggering
 
not to hijack your thread ( sorta )

how about when an entity takes dmg? that would eliminate alot of traceline and looping for a plugin im in the process of making

Silencer123 10-01-2006 16:59

Re: [REQUEST] Entity triggering
 
Quote:

Originally Posted by toazron1 (Post 386421)
not to hijack your thread ( sorta )

how about when an entity takes dmg? that would eliminate alot of traceline and looping for a plugin im in the process of making

Requests are only being accepted if there is no other way to do it.
So if you just want to make your code shorter you will sadly be ignored here.
:|
The above which I need seems to have no way to be done, yet, so I posted here.
But note, that if you do not get answers in the Scripting Help Forums,
you just make a Request here and after some minutes you get your Answer
in form of a big Reason why your Request is being declined.
:grrr:
Back to Topic: If this is being accepted I have no Clue in what Module this will be put into.

toazron1 10-01-2006 21:33

Re: [REQUEST] Entity triggering
 
Well if you want to get technical.
For people you can check every time they use something and then check the entities that they are looking at and get the information about that entity. So it doesn’t encompass all of what you asked but part of it is still possible.

There is no easy way to get when an entity has been damaged without a ridiculously long amount of code that isn’t 100% precise. Many of the natives that already exist were created for the very reason of making your code shorter. It has already been asked in scripting help (yes I did a search) and AFAIK there is no way to do it accurately.

I have been doing this for some time now (pre 0.9.3 AMXMOD) there is no need to talk down to me.
I didn't mean to intrude on your thread in an effort to kill two bird with one stone.

sawce 10-01-2006 21:39

Re: [REQUEST] Entity triggering
 
All this stuff is handled by the game dll inside of it's private data. It's not sent from the engine to the game dll or vice-versa.

It's not really possible/practical to hook while maintaining cross mod compatibility.

toazron1 10-01-2006 21:43

Re: [REQUEST] Entity triggering
 
Quote:

Originally Posted by sawce (Post 386540)
All this stuff is handled by the game dll inside of it's private data. It's not sent from the engine to the game dll or vice-versa.

It's not really possible/practical to hook while maintaining cross mod compatibility.

Is it possible to hook though? I don't really care about coss-mod compatibility; I'm only interested in the applications to NS. It was more of a post of "is this possible" rather then "I want this in now"

sawce 10-02-2006 01:36

Re: [REQUEST] Entity triggering
 
Quote:

Originally Posted by toazron1 (Post 386543)
Is it possible to hook though? I don't really care about coss-mod compatibility; I'm only interested in the applications to NS. It was more of a post of "is this possible" rather then "I want this in now"

It's "possible."

It's extremely complex, isn't worth it and very unlikely it'll be done, however.

Silencer123 10-02-2006 03:49

Re: [REQUEST] Entity triggering
 
There is only one way at the Moment to do the half of what I am requesting here:
Get the complete Maps Entity System and reproduce it in the Plugin.
This will be 2000 lines of Code and the Players actions aren't even included.
Entities are very important! I cannot believe they get so little developmet.

sawce 10-02-2006 05:07

Re: [REQUEST] Entity triggering
 
Quote:

Originally Posted by Silencer123 (Post 386674)
There is only one way at the Moment to do the half of what I am requesting here:
Get the complete Maps Entity System and reproduce it in the Plugin.
This will be 2000 lines of Code and the Players actions aren't even included.

Newsflash: without some extremely complicated and not worth it memory hacks that's the same way a module could do it.

Quote:

Originally Posted by Silencer123 (Post 386674)
Entities are very important! I cannot believe they get so little developmet.

Yeah, fakemeta and engine modules and entity manipulating natives in the core/other modules do not exist.

schnitzelmaker 10-02-2006 06:26

Re: [REQUEST] Entity triggering
 
understand i right you want i like this:
Code:
public entity_damage(...){}
Code:
public entity_triggert(...){}


All times are GMT -4. The time now is 04:55.

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