Please or Register to create posts and topics.

[Solved] (not) Detecting Disabled Portals

Page 1 of 2Next

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? :)

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?



Also, I made a map just for you! Sunset
Click Here to view my Workshop and play my puzzlemaker maps

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.

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 :wink:

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

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 :lol: .

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?

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

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.

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.

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

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.

Falsi sumus crusto!

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 :) .

Page 1 of 2Next