[Solved] (not) Detecting Disabled Portals
Quote from Sprowl on April 23, 2013, 5:09 pmHeya guys,
I got a question about VScripts 'n' Stuff. Right now I have a script that checks in a specific radius for some entities - playet, cubes and also portals. I don't have any problems with cubes and the player, but I have a little problem with portals after they got fizzled through a trigger_portal_cleanser. The script still detects that there is a portal, because, in fact, the prop_portal is still there. Its active state was just set to '0'.
Now I could put an output to every fizzler and place portals at the world origin and close them again so they are no more near the area the script checks for entites. But maybe someone here have a better idea, like reading the active state of the portal (is that possible?) or add an output to every fizzler onMapSpawn so I don't have to do it manually for every one.
So... any ideas?
Heya guys,
I got a question about VScripts 'n' Stuff. Right now I have a script that checks in a specific radius for some entities - playet, cubes and also portals. I don't have any problems with cubes and the player, but I have a little problem with portals after they got fizzled through a trigger_portal_cleanser. The script still detects that there is a portal, because, in fact, the prop_portal is still there. Its active state was just set to '0'.
Now I could put an output to every fizzler and place portals at the world origin and close them again so they are no more near the area the script checks for entites. But maybe someone here have a better idea, like reading the active state of the portal (is that possible?) or add an output to every fizzler onMapSpawn so I don't have to do it manually for every one.
So... any ideas? ![]()
Quote from BenVlodgi on April 24, 2013, 1:38 amyah, you could place prop_portals in your map (at the origin if you please) and just turn them on and off, and they will move there
couldn't you just exclude the entries based off of their 'active' property though?
yah, you could place prop_portals in your map (at the origin if you please) and just turn them on and off, and they will move there
couldn't you just exclude the entries based off of their 'active' property though?
Quote from Sprowl on April 24, 2013, 1:16 pmThat's the problem: I don't know how I could detect the off-state. func_portal_detectors in the detectable area are buggy as hell so I can't and don't want to use them.
That's the problem: I don't know how I could detect the off-state. func_portal_detectors in the detectable area are buggy as hell so I can't and don't want to use them.
Quote from josepezdj on April 24, 2013, 1:31 pmI guess Ben meant in your script, it could be possible to filter your entry by that keyvalue "Activated" depending on its value "1" or "0". Make it to ignore the entities with value "1" for that keyvalue
I guess Ben meant in your script, it could be possible to filter your entry by that keyvalue "Activated" depending on its value "1" or "0". Make it to ignore the entities with value "1" for that keyvalue ![]()
Quote from Sprowl on April 24, 2013, 3:24 pmThen tell me what function I need to write into my fancy editor to get the keyvalues of an entity
. Because I don't know that function and I couldn't even find it on the function list on the VDC. Maybe I oversee it.
I talked with Felix about this and he said that this isn't possible. Now I'm curious who's right
.
Then tell me what function I need to write into my fancy editor to get the keyvalues of an entity
. Because I don't know that function and I couldn't even find it on the function list on the VDC. Maybe I oversee it.
I talked with Felix about this and he said that this isn't possible. Now I'm curious who's right
.
Quote from josepezdj on April 24, 2013, 3:55 pmSprowl, I'm only starting to learn basic scripting... so I don't really know exactly how to achieve it; I was saying that I think Ben meant that in his post. Maybe with the function "FindKey" (string) you can search the keyvalue 'Activated' and the value "1"... what is the content of your script so far?
Sprowl, I'm only starting to learn basic scripting... so I don't really know exactly how to achieve it; I was saying that I think Ben meant that in his post. Maybe with the function "FindKey" (string) you can search the keyvalue 'Activated' and the value "1"... what is the content of your script so far?
Quote from Sprowl on April 24, 2013, 4:10 pmAllright, I'll try out the FindKey-Function.
The script is basicly that + sime functions after that which do some stuff with the entites it did find. I don't want to spoil everything here because I want to use it in my next maps.
Allright, I'll try out the FindKey-Function.
The script is basicly that + sime functions after that which do some stuff with the entites it did find. I don't want to spoil everything here because I want to use it in my next maps.
Quote from josepezdj on April 24, 2013, 4:22 pmThere's also "GetKeyBool"... and since the keyvalues 'Activated' value in the prop_portal is a boolean, maybe this can work out better. It returns the boolean value associated to the Keyvalue.
There's also "GetKeyBool"... and since the keyvalues 'Activated' value in the prop_portal is a boolean, maybe this can work out better. It returns the boolean value associated to the Keyvalue.
Quote from FelixGriffin on April 24, 2013, 7:37 pmThe CScriptKeyValues functions would let you do that, but VALVe forgot one thing...there's no way to get the KeyValues root from an entity so you can use the functions on it.
If you find a way please post it, it would be immensely helpful.
The CScriptKeyValues functions would let you do that, but VALVe forgot one thing...there's no way to get the KeyValues root from an entity so you can use the functions on it. ![]()
If you find a way please post it, it would be immensely helpful.
Quote from Sprowl on April 26, 2013, 3:07 pmHm I tried your functions jose, and they don't work. Just as Felix said. I also tried parenting a trigger_portal_detector to each portal but this doesn't help either. Seems like I have to do it manually with outputs to every fizzler.
Man I really thought there would be a more automatic way.Well, thanks anyway guys
.
Hm I tried your functions jose, and they don't work. Just as Felix said. I also tried parenting a trigger_portal_detector to each portal but this doesn't help either. Seems like I have to do it manually with outputs to every fizzler.
Man I really thought there would be a more automatic way.
Well, thanks anyway guys
.










