Flare effect using emit-sfx
Moderator: Moderators
You need to specify an object with more than two vertices.
Emitting from a flare = detonation at that point. Too bad that I can't import pieces with only two vertices into upspring (wakes on ships for instance). At least in .obj format.
Would be cool if you could pass over two pieces (vertices) so it the direction can be calculated...
Emitting from a flare = detonation at that point. Too bad that I can't import pieces with only two vertices into upspring (wakes on ships for instance). At least in .obj format.
Would be cool if you could pass over two pieces (vertices) so it the direction can be calculated...
-
- Posts: 501
- Joined: 18 May 2006, 21:19
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
Hmm. Spring crashes with this:
Revelant part of the .bos
The explosion generator entry
Code: Select all
[UNITINFO]
{
//What am I? Why am I here? What is my purpose in life?
ID=4;
UnitName=GHE_conhmg;
Version=1;
Side=ARM;
Objectname=GHE_conhmg;
Designation=GHE_conhmg;
Name=Conscript HMG;
Description=Conscript, Heavy Machine Gun;
FootprintX=1;
FootprintZ=1;
BMcode=1;
ThreeD=1;
ZBuffer=1;
NoAutoFire=0;
ExplodeAs=Infantry;
SelfDestructAs=Infantry;
Category=ARM KBOT LEVEL1 NOTAIR NOTSUB CTRL_G;
TEDClass=KBOT;
Copyright=Copyright 1997 Humongous Entertainment. All rights reserved.;
Corpse=GHE_con_dead2;
unitnumber=15;
ShootMe=1;
EnergyMake=100;
MetalMake=100;
Mass=1;
idleAutoHeal=5;
//Build me an army...
BuildDistance=100;
BuildCostEnergy=400;
BuildCostMetal=140;
MaxDamage=80;
MaxWaterDepth=15;
MaxSlope=40;
EnergyUse=3;
BuildTime=270;
EnergyStorage=-10;
MetalStorage=0;
Builder=1;
WorkerTime=50;
//I can see! I can see! *Goes looking for porno*
SightDistance=450;
RadarDistance=0;
SoundCategory=PSY_INF;
//Run away! (Movement tags)
MovementClass=Infantry;
DefaultMissionType=Standby;
maneuverleashlength=200;
mobilestandorders=1;
StandingMoveOrder=1;
canmove=1;
canpatrol=1;
canstop=1;
canguard=1;
MaxVelocity=2.1;
BrakeRate=0.6;
Upright=1;
Acceleration=2;
TurnRate=1010;
SteeringMode=1;
//Shoot-me-do! (Weapon tags)
CanAttack=1;
Weapon1=con_hmg;
firestandorders=1;
//Springy stuff (boing!)
HideDamage=1;
ShowPlayerName=1;
SeismicSignature=1;
iconType=inf;
canBuild=1;
canRepair=0;
canRestore=0;
canReclaim=0;
canAssist=0;
shownanoframe=0;
shownanospray=0;
[SFXTypes]
{
explosiongenerator1=bloodsmall;
explosiongenerator2=bloodlarge;
}
}
Code: Select all
HitByWeapon(anglex,anglez)
{
signal SIG_HIT;
set-signal-mask SIG_HIT;
emit-sfx 1024+1 from body;
}
Code: Select all
[bloodsmall]
{
usedefaultexplosions=1;
[dirt]
{
[properties]
{
alpha=50;
alphaFalloff=0;
size=1;
sizeExpansion=2;
slowdown=1;
color=1 0 0;
speed=4;
pos=0;
}
underwater=1;
air=1;
water=1;
ground=1;
count=10;
}
}
Did you grab the latest files from the svn?
http://rattle.from-hell.net/spring/reso ... ld2274.rar
I hope I didn't miss anything. Extract that over a latest dev-build installation and the exe as well (not included of course). It should work. Oh and you should begin with explosiongenerator0 and emit-sfx 1024. Shouldn't cause troubles though.
Just noticed,is missing the custom: in front of the explosion type.
EDIT: Comment out "usedefaultexplosions=1;", this works. Looks wierd though :)
Looks pretty nice and works...
http://rattle.from-hell.net/spring/reso ... ld2274.rar
I hope I didn't miss anything. Extract that over a latest dev-build installation and the exe as well (not included of course). It should work. Oh and you should begin with explosiongenerator0 and emit-sfx 1024. Shouldn't cause troubles though.
Just noticed,
Code: Select all
explosiongenerator2=bloodlarge;
EDIT: Comment out "usedefaultexplosions=1;", this works. Looks wierd though :)
Code: Select all
[smallblood]
{
// usedefaultexplosions=1;
[dirt]
{
[properties]
{
alpha=50;
size=10;
color=1.0, 0.0, 0.0;
alphaFalloff=2;
speed=0.75 r-1.5, 1.7 r1.6, 0.75 r-1.5;
pos=-10 r20, 20, -10 r20;
slowdown=1;
sizeExpansion=2;
}
underwater=1;
air=1;
water=1;
ground=1;
count=10;
}
}
-
- Posts: 501
- Joined: 18 May 2006, 21:19
Can I get some help?
and
are the relevant bits from the script
is th relevant bit from the explosions tdf
is the relevant bit from the unit.
Worked perfect before I added the stuff. I know the explosion itself probably looks like crap, but I wasn't aiming for pretty, just a starting point.
Oh yeah, game crashes on .give [unit]
I've got all the latest svn stuff.
Code: Select all
Engine()
{
emit-sfx 1024+0 from smokepoint1;
emit-sfx 1024+0 from smokepoint2;
sleep 50;
}
Code: Select all
Create()
{
hide firep1;
hide firep2;
hide smokepoint1;
hide smokepoint2;
Static_Var_1 = 0;
start-script SmokeUnit();
start-script Engine();
}
Code: Select all
[AFT]
{
[muzzleflame]
{
[properties]
{
size = 40;
sizeGrowth = -2;
pos = 0, 0, -5 r2;
speed=0.5 r-1, 0.5 r-1, 1.5 r0.5;
color=1, 0.4, 0.1;
alphaFalloff=2;
}
underwater=0;
air=1;
water=1;
ground=0;
count=4;
}
[smoketrail]
{
[properties]
{
size = 5;
sizeGrowth = 0;
pos = 0, 0, -5 r2;
speed=0.5 r-1, 0.5 r-1, 1.5 r0.5;
color=1, 1, 1;
alphaFalloff=2;
}
underwater=0;
air=1;
water=0;
ground=1;
count=1;
}
}
Code: Select all
[SFXTypes]
{
explosiongenerator0=custom:AFT;
}
Worked perfect before I added the stuff. I know the explosion itself probably looks like crap, but I wasn't aiming for pretty, just a starting point.
Oh yeah, game crashes on .give [unit]
I've got all the latest svn stuff.
Ehh....
"Uknown unit type"??
At least it doesn't crash now.
~~~
Wait, I think I fixed it. FBIEd mucked up the custom stuff in the fbi.
~~~~
Fixed the FBI problems, but now the game crashes again on .give
"Uknown unit type"??
At least it doesn't crash now.
~~~
Wait, I think I fixed it. FBIEd mucked up the custom stuff in the fbi.
~~~~
Fixed the FBI problems, but now the game crashes again on .give
Last edited by Caydr on 27 Sep 2006, 21:15, edited 1 time in total.
Code: Select all
[AFT]
{
[smoke2]
{
[properties]
{
ageSpeed=0.02;
size = 10;
sizeGrowth = -1;
pos = -4 r8, r4, -4 r8;
wantedPos = -3 r6, r3, -3 r6;
speed = -1 r2, -1 r2, -1 r2;
glowFalloff=10;
}
water=1;
ground=1;
air=1;
count=1;
}
[heatcloud]
{
[properties]
{
pos = 1 r-1, -1 r1, 1 r-1;
speed = 0, -0.5 r0.5, 0;
heat=75;
maxheat=100;
heatFalloff=3;
size = 5;
sizeGrowth=-0.01;
}
air=1;
ground=1;
water=1;
count=3;
}
}
EDIT: FFS
Code: Select all
replaces tabs... so does [quote]... bah
Now while we're at it, could anyone explain to me what the three values for pos are?
I was assuming XYZ offset values from the initial emit location and r = radius and the value after r is a multiplier or something...
This needs a static-var called bMoving. In the Create() function initialize bMoving with FALSE and start the Engine script.
Change the Engine() function to
Add to the StartMoving()/StopMoving() functions
If you really want it to emit all the time then leave out the parts involving bMoving and use while (1) or while (TRUE) (there isn't really a difference) instead of while (bMoving).
Code: Select all
bMoving = FALSE;
start-script Engine();
Code: Select all
Engine()
{
while (bMoving)
{
emit-sfx 1024+0 from smokepoint1;
emit-sfx 1024+0 from smokepoint2;
sleep 50;
}
}
Code: Select all
bMoving = TRUE; // in StartMoving()
bMoving = FALSE; // in StopMoving()
OOOooooo
So now I've got
And it says "unknown identifier true"
So now I've got
Code: Select all
Create()
{
hide firep1;
hide firep2;
hide smokepoint1;
hide smokepoint2;
Static_Var_1 = 0;
start-script SmokeUnit();
start-script Engine();
}
.....
Engine()
{
while (true)
{
emit-sfx 1024+0 from smokepoint1;
emit-sfx 1024+0 from smokepoint2;
sleep 50;
}
}
Last edited by Caydr on 27 Sep 2006, 21:52, edited 3 times in total.
-
- Posts: 501
- Joined: 18 May 2006, 21:19