Beacon [message #272013] |
Mon, 09 July 2007 15:23  |
 |
BlueThen
Messages: 2402 Registered: February 2006
Karma: 0
|
General (2 Stars) |
|
|
How could I get a beacon to deploy facing the direction the player is facing, if possible? Just need to do this for a mod.
|
|
|
Re: Beacon [message #272020 is a reply to message #272013] |
Mon, 09 July 2007 15:43   |
a100
Messages: 45 Registered: March 2007
Karma: 0
|
Recruit |
|
|
You need to get the facing and use basic trig.
This is pseudo code for how to achieve it.
First:
#include <math.h>
#define PI 3.14159265
Then:
On_Beacon_Creation {
float facing = Commands->Get_Facing(planter)
Vector3 pos = Commands-> Get_Position(planter)
pos.X += -1*(cos(facing*(PI / 180)))
pos.Y += -1*(sin(facing*(PI / 180)))
// -1 is the distance away from the player can be set to more/less
Commands->Set_Position(beacon,pos)
}
Only one problem tho which is that player could face a buidling and beacon may spawn in the building in which case its un-disarmable
|
|
|
|
|
|
|
Re: Beacon [message #272061 is a reply to message #272013] |
Mon, 09 July 2007 18:47   |
_SSnipe_
Messages: 4121 Registered: May 2007 Location: Riverside Southern Califo...
Karma: 0
|
General (4 Stars) |
|
|
can i ask its it that big? i mean a beacon? come on...
|
|
|
|
|
Re: Beacon [message #272078 is a reply to message #272013] |
Mon, 09 July 2007 21:43  |
 |
AoBfrost
Messages: 1248 Registered: March 2007
Karma: 0
|
General (1 Star) |
|
|
Level edit's presets help alot for characters, vehicles, objects, and animations, i used to ask whats the preset for this and that, now i search level edit and never asked again.
tips
editing ssaow
main function is in aow.cpp
editing ssgm
main function is gmscripts.cpp
editing crates
ssaow:crates.cpp
ssgm: gmcrates.cpp

Scrin wrote on Fri, 05 October 2007 12:19 | ''whoa im the photoshop''
|
KANE LIVES!!!
[Updated on: Mon, 09 July 2007 21:44] Report message to a moderator
|
|
|