Mod Question Repository... Questions come in, answers go out
Moderator: Moderators
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Mod Question Repository... Questions come in, answers go out
i know hoi. thank you, but thats not the problem.
Re: Mod Question Repository... Questions come in, answers go out
then maybe the fireplatform tag is bugged, transports dont give the stuff inside it dmg.
Re: Mod Question Repository... Questions come in, answers go out
It doesn't have to be a fake building. You can give real structures transport capabilities.
Hoi, there's nothing wrong with isfireplatform, it's doing its job fine. Absorbing damage isn't in its job description. Either the hitsphere of the loaded unit is sticking out and being contacted before the bunker (so the bunker is actually being meatshielded) or it's just being hit by very high velocity weapon and/or weapons with large splash damage.
We've been working with this to, and from my tests it looks like bunkers still take full normal damage if the garrisoned unit is poking out and being hit. There are really two workarounds you could choose from:
1) Add the tag cobid=some integer; to the bunker's fbi.
2a) Make the garrisoned units invincible:
In the garrisonable unit scripts, add this:
or 2b) "Bury" the garrisoned units:
In the bunker script, add this:
In the garrisonable unit scripts, add this:
If you use 2b just make sure you set up AimFromWeapon*() and QueryWeapon*() correctly so they still end up in valid firing positions when you move the model around.
Hoi, there's nothing wrong with isfireplatform, it's doing its job fine. Absorbing damage isn't in its job description. Either the hitsphere of the loaded unit is sticking out and being contacted before the bunker (so the bunker is actually being meatshielded) or it's just being hit by very high velocity weapon and/or weapons with large splash damage.
We've been working with this to, and from my tests it looks like bunkers still take full normal damage if the garrisoned unit is poking out and being hit. There are really two workarounds you could choose from:
1) Add the tag cobid=some integer; to the bunker's fbi.
2a) Make the garrisoned units invincible:
In the garrisonable unit scripts, add this:
Code: Select all
static-var inBunker;
HitByWeaponId(z,x,id,damage) {
if(inBunker) { return 0; }
if(!inBunker) { return 100; }
}
setSFXoccupy(level) {
if(level == 0) { //now in a transport
var transport, tid;
tid = get TRANSPORT_ID;
transport = get COB_ID(tid);
if(transport == some integer) { //the cobid tag you entered earlier
inBunker = 1;
}
}
if(level != 0) { //anywhere else
inBunker = 0;
}
}
In the bunker script, add this:
Code: Select all
Create() {
move attachpiece1 to y-axis [negative value] now;
move attachpiece2 etc
}
Code: Select all
setSFXoccupy(level) {
if(level == 0) { //now in a transport
var transport, tid;
tid = get TRANSPORT_ID;
transport = get COB_ID(tid);
if(transport == some integer) { //the cobid tag you entered earlier
move model_root_object to y-axis [positive value] now;
}
}
if(level != 0) { //anywhere else
move model_root_object to y-axis [0] now;
}
}
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Mod Question Repository... Questions come in, answers go out
awesome gnome! the 1st one looks like what i need since it will have to shoot out of it and cant by under ground, but i think ill add a randomizer to the return tho so its not totally zero since its not a covered bunker, it should just be much harder to get a good shot in.
Re: Mod Question Repository... Questions come in, answers go out
It'd still be able to fire if its hitsphere is underground. That's why I mentioned AimFromWeapon and QueryWeapon 
But yeah if you want them to take some damage underground is obviously not the way to go.

But yeah if you want them to take some damage underground is obviously not the way to go.
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Mod Question Repository... Questions come in, answers go out
who is this we?
Re: Mod Question Repository... Questions come in, answers go out
Can units path through 'unoccupied' squares set by yardmap?
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Mod Question Repository... Questions come in, answers go out
Can lua tell if a unit is on a open yardmap square as opposed to empty ground and what type of unit said yardmap square belongs too?
Re: Mod Question Repository... Questions come in, answers go out
COB<->Lua, the events are all there...
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Mod Question Repository... Questions come in, answers go out
cant find the number to define transportid
EDIT: n/m
its in here
http://spring.clan-sy.com/wiki/Units:.bos/.COB
its 94
for some reason fire fox search doesnt like frenglish pages
EDIT: n/m
its in here
http://spring.clan-sy.com/wiki/Units:.bos/.COB
its 94
for some reason fire fox search doesnt like frenglish pages
Re: Mod Question Repository... Questions come in, answers go out
You were missing an underscore
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Mod Question Repository... Questions come in, answers go out
where would be the best place to put a falling detection in a bos for the drop unload type?
also going back to the bunker, part of the model goes under ground, but i guess digger=1 doesnt work in spring? is there any work around with this or should i give up and make a dark are for the underground piece?
also going back to the bunker, part of the model goes under ground, but i guess digger=1 doesnt work in spring? is there any work around with this or should i give up and make a dark are for the underground piece?
Re: Mod Question Repository... Questions come in, answers go out
If it's underground, it's underground, that's all there is to it, unless you wish to write a lua script which deforms the ground for you. That'd make it rather easy to scout though afaik.
http://spring.clan-sy.com/mantis/view.php?id=630bobthedinosaur wrote:where would be the best place to put a falling detection in a bos for the drop unload type?
Added tags:
transportUnloadMethod = <integer>;
0 - land unload, 1 - flyover drop, 2 - land flood
fallSpeed = <float>
unitFallSpeed = <float>
These dictate the speed of units being dropped from the transport.
fallSpeed is used on the transports fbi file, to dictate the speed of all units it drops, unitFallSpeed is used on each transported unit to override fallSpeed.
Transport AI now calls the cob function:
'StartUnload'
which is called once when transport starts to lower during land flood method.
Dropped units call the cob functions:
'falling' and 'landed' so that you may start and stop a parachute animation.
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Mod Question Repository... Questions come in, answers go out
crap on the deforming.
and:
well i meant for a unit that is falling, where would the best loop be in its script to check for falling? so you can add whatever animation/ fx
and:
well i meant for a unit that is falling, where would the best loop be in its script to check for falling? so you can add whatever animation/ fx
-
- Posts: 854
- Joined: 28 Jan 2005, 18:15
Re: Mod Question Repository... Questions come in, answers go out
By the sound of it, you don't have to check for falling. Just add a falling() function and a landed() function in the script, have falling() start the animation/fx stuff, and landed() kill it. Its kinda like how move script stuff works.
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Mod Question Repository... Questions come in, answers go out
strange...
now how about that mech critic damage assigning script?
now how about that mech critic damage assigning script?

- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Mod Question Repository... Questions come in, answers go out
on a different note:
what does holdtime do? cant find documentation, its in some bertha tdf/ lua weapon files.
what does holdtime do? cant find documentation, its in some bertha tdf/ lua weapon files.
Re: Mod Question Repository... Questions come in, answers go out
In OTA holdtime forced the weapon to wait for that time in ms once on target before firing. Afaik spring doesn't implement it, but i may be wrong, i've not checked.
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2702
- Joined: 25 Aug 2004, 13:31
Re: Mod Question Repository... Questions come in, answers go out
hmm thats what i assumed it is, ill test it later.
another question. is there away where i can kill all the units qued up in factory line up or maybe just get the resources back like the cancel build option. i want to kill a factory with a timer but i dont want the resources wasted for units that are still being build due to over queing
another question. is there away where i can kill all the units qued up in factory line up or maybe just get the resources back like the cancel build option. i want to kill a factory with a timer but i dont want the resources wasted for units that are still being build due to over queing