Is there a way to use a weapon as a marker for, say, a care package?
eg:
Glow with light for an indefinite time
make a model go to were the projectile hit the floor
fade in the model so that it can be interacted with.
Thanks
Projectiles
Re: Projectiles
I am not good at scripting so i can nt answer fully now because it would need days of experimenting and testing but here are some tips.Someone else could use this as a starting point and give you a better example.
One way is to script the car to change ambient using this low level command
There must be various wawys to da that.
One way could be that the projectile pawn rendering is switched off when it hits the floor and then you use the projectiles enity name to position the car Pawn to the projectile.
or
(high level)
One way is to script the car to change ambient using this low level command
Maybe the weapon can not be used as a trigger.You can script a pawn that moves like a projectile when a certain key is pressed and or a specific attribute is on to give the location it collides with the floor.SetEntityLighting(string EntityName, float FillColorR, float FillColorG, float FillColorB, float AmbientColorR, float AmbientColorG, float AmbientColorB, bool AmbientLightFromFloor);
Changes the FillColor and AmbientColor of the specified entity (Pawn, StaticEntityProxy, Attribute, Player). For the player use "Player" as EntityName.
There must be various wawys to da that.
One way could be that the projectile pawn rendering is switched off when it hits the floor and then you use the projectiles enity name to position the car Pawn to the projectile.
PositionToPawn(string PawnName, float OffsetX, float OffsetY, float OffsetZ);
PositionToPawn(string PawnName, float OffsetX, float OffsetY, float OffsetZ, bool Flag1);
PositionToPawn(string PawnName, float OffsetX, float OffsetY, float OffsetZ, bool Flag1, bool Flag2);
Move the Pawn's actor to the location of the Pawn whose szEntityName is PawnName and apply the offsets to that location.
Move the Pawn's actor to the location of the Pawn whose szEntityName is PawnName and apply the offsets to that location. If Flag1 is true then the offsets are applied in the direction the PawnName actor is facing.
Move the Pawn's actor to the location of the Pawn whose szEntityName is PawnName and apply the offsets to that location. If Flag1 is true then the offsets are applied in the direction the PawnName actor is facing. The extra flag Flag2 will determine if the final rotation of the slave Pawn should match the angles of the master Pawn.
Example:
PositionToPawn("PAWN_NAME", 0, 0, -96, true, false);
will use the rotation of the master Pawn to position the slave Pawn, 96 texels behind the master Pawn, but not match the rotation of the slave Pawn with the master Pawn.
This command is equivalent to:
PositionToPawn("PAWN_NAME", 0, 0, -96, true);
or
PositionToBone(string szEntityName, string BoneName);
Position the Pawn's actor to the bone BoneName of the specified entity
You can change the alpha to show the car can be interacted with using another commandint GetEntityScreenX(string EntityName);
int GetEntityScreenY(string EntityName);
The above two commands return the X, Y screen position of the entity EntityName (Pawn, StaticEntityProxy, Attribute, Player). For the player use "Player" as EntityName, for the pawn running the script use "".
(high level)
FadeIn(float Time, float Alpha);
Increase the alpha of the actor from its present value to Alpha in Time seconds. The next action is executed only after the alpha value is reached. If the pawn has a weapon actor attached its alpha is taken from the current alpha of the pawn actor.
Re: Projectiles
Maybe that is more suitable for the alpha,low level script command.
.
Code: Select all
SetAlpha(float Alpha);
Set the transparency for the Pawn's actor