AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Solved]Line (https://forums.alliedmods.net/showthread.php?t=163962)

usaexelent 08-05-2011 15:29

[Solved]Line
 
I read about Trace line but I still can't figure it out.
I want to know how to make Traceline from one origin to other.And if it triggers any player some function would be called

abdul-rehman 08-06-2011 07:15

Re: Line
 
Searching is always an option:
http://forums.alliedmods.net/showpos...30&postcount=6
https://forums.alliedmods.net/showthread.php?t=66076

U can use this to experiment with traceline:
https://forums.alliedmods.net/showthread.php?t=103851

usaexelent 08-06-2011 07:16

Re: Line
 
I already searched, if hadn't searched i wouldn't asked for help

abdul-rehman 08-06-2011 07:16

Re: Line
 
Quote:

Originally Posted by usaexelent (Post 1526889)
I already searched, if hadn't searched i wouldn't asked for help

Do the above threads help ?

usaexelent 08-06-2011 07:30

Re: Line
 
No, I already saw these threads.

Hunter-Digital 08-06-2011 07:42

Re: Line
 
See funcwiki on trace_line() and get it's return, that should be assigned to an entity if it hit any, check if that entity is a player and trigger your function...

Code:

new ent = trace_line( ... ) // I don't remember the params

if(is_user_connected(ent))
{
    // ent is player
}


usaexelent 08-06-2011 08:07

Re: Line
 
Do I need a FM forward that checks is some one triggered it?

abdul-rehman 08-06-2011 08:34

Re: Line
 
No, there isnt any need of such forward, you can just do a traceline, and if it hits a player, then trigger your function.

usaexelent 08-06-2011 08:47

Re: Line
 
I'm messed :shock:

Hunter-Digital 08-06-2011 09:33

Re: Line
 
If you can't understand a simple function call then I can't help you, I already gave you an example.


All times are GMT -4. The time now is 03:20.

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