Page 1 of 1

Script "Injection"

Posted: August 6th, 2007, 9:19 pm
by ODD
Scripting question...

Let's say I finish a map, and 3 months later, my .map file gets erased. Let's also say I had put a few secrets into the map, but I don't remember where my triggers where. I'm wondering if it's possible to write a script, put it in my PK3, and make it find and print the coordinates of the trigger brushmodel.

Any help is appreciated.

Posted: August 6th, 2007, 9:36 pm
by Deadly
i doubt that would work. but what do u want to find the trigger or the brushmodel? what you could do and it MIGHT work, /r_showtris 1 and try to find the trigger.

Posted: August 6th, 2007, 9:45 pm
by ODD
Deadly wrote:but what do u want to find the trigger or the brushmodel?
The brushmodel that acts as the trigger to open the secret.

Like...

Code: Select all

main()
{
thread showCoords();
}

showCoords()
{
trig1 = getent ("trig1", "targetname");
while (1)
{
iprintln( trig1.origin )
}
I know very little of the language... and most of that is probably invalid, but that's just to give you an idea of what I'm trying to do.

Posted: August 6th, 2007, 10:04 pm
by Deadly
lol i didnt know that showtris wouldnt work and lol thats my thread =D

Posted: August 6th, 2007, 10:06 pm
by Luke
There was a thread that covered this recently i think. You'll get 0,0,0 for triggers and brushmodel as they don't have an origin on they're own, unless they were given an origin.

Posted: August 7th, 2007, 11:15 pm
by Deadly
yo send me the .bsp file i will find and name the corredinits or all the trigs. =]

Posted: August 11th, 2007, 1:45 am
by ODD
What's your XFire?

BTW:

Not my map, the above was merely hypothetical. I'm finding secrets... >_>

Posted: August 11th, 2007, 12:03 pm
by YaNo
Arrekusuof93 wrote:What's your XFire?

BTW:

Not my map, the above was merely hypothetical. I'm finding secrets... >_>
don't decompile maps :P i tried it at nm_portal, just try to find it yourself :D
i found it at nm_portal without decompile :wink: