Can anyoe tell me why this doesn't work:

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Dexter13

The Coding Machine
Dec 18, 2001
111
0
0
Visit site
exec function Healing()
{
local Vector SpawnLoc;
local Vector Start;
local vector X,Y,Z;
local int Distance;

Distance = 200;
GetAxes(PlayerPawn(Owner).ViewRotation,X,Y,Z);
Start=PlayerPawn(Owner).Location;
// I try putting 'Location + CalcDrawOffset();' but it wont compile when i do!
SpawnLoc=Start + Vector(PlayerPawn(Owner).ViewRotation) * Distance;
Spawn(class'botpack.HealthPack',,,SpawnLoc);
}

can anyone see the problem?
 

Blödsinn machen

cannon fodder
Dec 4, 2001
68
0
0
Switzerland
dwmade.stormpages.com
rightfully so; as CalcDrawOffset exists only for subclasses of class Inventory. Perhaps you should also take into account the player's EyeHeight. And another thing (sorry to have to dump all my s*** on you, at the moment I am rather frustrated myself), you might want to perform a trace before spawning, otherwise the HealthPack may end up being spawned inside level geometry...
 

Shiit

Shiit
Dec 19, 2000
168
0
0
Besides, you'll have to make sure the healthpack won't respawn. BTW, is it supposed to heal someone, or spawn a medkit on the ground? In the first case, it'd be cleaner to just add 20 health to the person in front of the player (found using a Trace), the latter you should make your medkit fall to the ground. Floating med's suck ;)
 

RegularX

Master of Dagoth Lies
Feb 2, 2000
1,215
0
0
Chicago, IL
Originally posted by Shiit
Besides, you'll have to make sure the healthpack won't respawn. BTW, is it supposed to heal someone, or spawn a medkit on the ground? In the first case, it'd be cleaner to just add 20 health to the person in front of the player (found using a Trace), the latter you should make your medkit fall to the ground. Floating med's suck ;)


Yep, yep and .... yep.


The spawn code is pretty frustating I found when implementing some buy stuff. My fave was spawning weapons that the spawner couldnt use, but everyone else could ... wheee!

Unless there is a good reason for it, avoid it.


rgx