Page 1 of 1
CEG Problems
Posted: 17 Feb 2010, 11:30
by Erik
Code: Select all
Killed()
{
emit-sfx 1025 from main;
emit-sfx 1026 from main;
// explode turret type FALL; //fall off and bounce around!
}
gives an error while
Code: Select all
FireWeapon1()
{
emit-sfx 1024 from muzzle1;
}
works fine
Unit def: (LUA)
Code: Select all
sfxtypes = {
explosiongenerators = {
[[custom:Muzzleflash1]],
[[custom:Shell_impact]],
[[Custom:Blue_Death]],
},
},
what am i doing wrong?
On the death explosion it says "couldn't find CEG outside of script execution" or so.
Re: CEG Problems
Posted: 17 Feb 2010, 12:45
by Tobi
What about:
Code: Select all
FireWeapon1()
{
emit-sfx 1025 from main;
}
and
Code: Select all
FireWeapon1()
{
emit-sfx 1026 from main;
}
Do those work?
Also, copy and paste the error message
exactly. That allows us to search for it in the engine source code.
Re: CEG Problems
Posted: 17 Feb 2010, 12:50
by Erik
lol funny
now that i changed the game crashes on spawing (its the start unit)
when i change it back it STILL crashes
so doing effectively nothing caused a different behavior WTF?
What is wrong with that stuff?
It seems to have to do with this:
Any errors in there?
Code: Select all
[Blue_Death] {
useDefaultExplosions = 0;
[SMOKE1] {
class=CSimpleParticleSystem;
[properties]
{
alwaysVisible=1;
Texture=blueexplosion;
sizeGrowth=1.2;
sizeMod=1.0;
pos = r-3 r3, 1.5, r-3 r3;
emitVector = 0, 0, 0;
gravity = 0, 0, 0;
colorMap = 0.3 0.27 0.25 0.1 0 0 0 0.0; //1.0 0.5 0.0 0.01 0.5 0.4 0.3 1.0
airdrag = 0.9;
particleLife=45;
particleLifeSpread=13;
numParticles=3;
particleSpeed=0.5;
particleSpeedSpread=0.2;
particleSize=1.9;
particleSizeSpread=0.6;
emitRot=90;
emitRotSpread=0;
directional=1;
useAirLos=0;
}
water=1;
ground=1;
air=1;
count=1;
} //smoke
[Groundflash]
{
flashsize=70; // The radius of the groundflash.
flashalpha=0.7; // [0, 1]: How transparent the groundflash is. Generally, the higher, the brighter.
circlegrowth=3.5; //A groundflash can have an additional circle that expands outwards. This controls how fast the circle grows.
circlealpha=0.4;// How transparent the circle is.
ttl =10; // How long the groundflash lasts.
color= 0.5 0.5 0.8 0.01 0.3 0.3 0.3 0.01 0.0 0.0 0.0 0.01;
}
} //DEF-system
Re: CEG Problems
Posted: 17 Feb 2010, 21:51
by KDR_11k
Are you sure you're allowed to capitalize "custom:" ?
Re: CEG Problems
Posted: 17 Feb 2010, 22:56
by Forboding Angel
If it's crashing on unit spawn it's a problem in the unitdef. Ceg errors tend to fail pretty gracefully, but unitdef errors still cause outright crashes.
Re: CEG Problems
Posted: 17 Feb 2010, 23:04
by FLOZi
Forboding Angel wrote:If it's crashing on unit spawn it's a problem in the unitdef. Ceg errors tend to fail pretty gracefully, but unitdef errors still cause outright crashes.
bad unitdefs are usually stripped out when the game is loading
Re: CEG Problems
Posted: 18 Feb 2010, 03:39
by Argh
Not ones that are the result of bad sound or CEG references.
Your CEG names, if using Lua for UnitDefs and TDF for CEGs should not include any capital letters, i.e.:
Code: Select all
[[custom:muzzleflash1]],
[[custom:shell_impact]],
[[custom:blue_death]],
That's because all TDF-generated CEGs have lower-case names.
Re: CEG Problems
Posted: 24 Feb 2010, 10:10
by Erik
So i made all of it lowercase, nothing changes.
I even have uppercase ones that work so why not this one?
Edit: Seriously whats wrong with that shit?
I messed around a bit and overwrote a non working CEG with a working one result: both now crash the game.
WTF?
Re: CEG Problems
Posted: 25 Feb 2010, 12:30
by Argh
It sounds like you must have a problem with your resources or sounds.
If it's crashing the game, it's probably a bad sound reference, not the CEG. A bad CEG reference causes error spam, not a crash.
Re: CEG Problems
Posted: 25 Feb 2010, 13:07
by Erik
It was a type on the unit def that crashed it :\
But as i am here i've got another question:
I got a muzzleflash animation, how do i make it go straight vertical no matter how the point is orientated, i messed around a bit with
'dir x,y,z; ' to overwrite the standart values.
but i couldn't figure it out, straight left,right,front, back all work but not straight upwards/downwards.
Re: CEG Problems
Posted: 25 Feb 2010, 17:44
by Forboding Angel
Erik wrote:It was a type on the unit def that crashed it :\
But as i am here i've got another question:
I got a muzzleflash animation, how do i make it go straight vertical no matter how the point is orientated, i messed around a bit with
'dir x,y,z; ' to overwrite the standart values.
but i couldn't figure it out, straight left,right,front, back all work but not straight upwards/downwards.
Just rotate the piece it's emitted from... that would be the easiest way. If you don't have something you can already rotate, open up upspring and "Add Empty", position it, then in cob in the create function, just rotate it upwards, easy peazy
