AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   deathrun map pass (https://forums.alliedmods.net/showthread.php?t=190143)

Stinkyfax 07-15-2012 10:23

deathrun map pass
 
Simple but yet have no idea how to make.
Consider deathrun map, I want to give CT a cookie once they pass the map, how can I 'hook' the "event" of person finishing the map?
I've heard it adds +frag in scores table but killing adds frags too, while no cookies should go to murderers.

thetwistedpanda 07-15-2012 12:44

Re: deathrun map pass
 
Throw a trigger_multiple at the end of the map, hook SDK_OnStartTouch, give client cookie on touch. Something along that line should suffice.

Stinkyfax 07-15-2012 13:02

Re: deathrun map pass
 
Quote:

Originally Posted by thetwistedpanda (Post 1750949)
Throw a trigger_multiple at the end of the map, hook SDK_OnStartTouch, give client cookie on touch. Something along that line should suffice.

But I don't know the end of map, and going through 100 deathrun to gather coordinates maps is not a solution

Haven't the map creators considered creating some trigger? They couldn't accept a though that someone might want to write a plugin for their maps?

thetwistedpanda 07-15-2012 14:54

Re: deathrun map pass
 
You'd have to do it manually for each map, there's no way around that as maps are not uniform - you should be able to create it via a script, as I recall there being a snippit to create brush entities. It may take a good bit of your time, but it's a fool proof method. Can even load the maps into hammer, make the entity the right size, grab coordinates, then load it into a script that re-creates them without having to download a new map.

That's just the easiest method that comes to mind. Alternatively you can set a single area per map and just loop distances to see if they're within x units, but that's far more intensive. All maps are different so you can't rely on using teleporters, grabbing weapons, hooking bhop platforms, etc. Although you could write an overly complex system that uses pre-defined configurations as to what methods you want to hook. A plugin that manages picking up weapons, bhop platforms, killing the T, etc and simply tell the plugin what methods to use for what map.

TheHardstyleBro 07-15-2012 15:14

Re: deathrun map pass
 
Isn't there an plugin that detects where the player is like cP mod but then without the bhop stuff

Mitchell 07-15-2012 20:59

Re: deathrun map pass
 
Quote:

Originally Posted by TheHardstyleBro (Post 1751098)
Isn't there an plugin that detects where the player is like cP mod but then without the bhop stuff

CP uses a data base, when ever you add a new map, you have to add the starting area and the ending area. no way aroud it, epecially if the map is old.


All times are GMT -4. The time now is 23:02.

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