A new mod: Packwar
Moderator: Moderators
Re: A new mod: Packwar
You can use a TA tutorial, some of the information will be outdated but it's enough to give you a basic grasp on the situation I think.
Re: A new mod: Packwar
Ok, I tried using this INBUILDSTANCE thing in the StartBuilding() function. That didn't work. What am I doing wrong? Isn't there any scripting tutorial for Spring out there?
- Pressure Line
- Posts: 2283
- Joined: 21 May 2007, 02:09
Re: A new mod: Packwar
you doin it wrong!
add the line "set INBUILDSTANCE to 1;" in Create()
at least i think thats how it goes. StartBuilding() gets called when it starts building, which it cant do if the buildstance is set to false
add the line "set INBUILDSTANCE to 1;" in Create()
at least i think thats how it goes. StartBuilding() gets called when it starts building, which it cant do if the buildstance is set to false

Re: A new mod: Packwar
PL, bullshit. StartBuilding is exactly where set INBUILDSTANCE goes.
Can't say what you're doing wrong without seeing the script.
Can't say what you're doing wrong without seeing the script.
- Pressure Line
- Posts: 2283
- Joined: 21 May 2007, 02:09
Re: A new mod: Packwar
x: poos, i got mixed up.
Re: A new mod: Packwar
This is my script ATM:
When I order my commander to build something, it stays put. This is normal, as I didn't script it. However, the unit I want it to build just stays at 0 health. The unit has 1000 buildtime, the commander has 100 workertime.
Code: Select all
#define TA
piece base, turret, nano, nano_emitter, rocket, rocket_emitter
StartBuilding()
{
set INBUILDSTANCE to 1;
}
StopBuilding()
{
set INBUILDSTANCE to 0;
}
- Pressure Line
- Posts: 2283
- Joined: 21 May 2007, 02:09
Re: A new mod: Packwar
you need to add:
to your script
Code: Select all
QueryNanoPiece(piecenum)
{
piecenum = nano_emitter; //or whatever you want the nanostream to come from
}
Re: A new mod: Packwar
for compatibility with 0.76 you should provide StartBuilding with two arguments i.e.
Code: Select all
StartBuilding(heading, pitch) {
set INBUILDDISTANCE to 1;
}
- Pressure Line
- Posts: 2283
- Joined: 21 May 2007, 02:09
Re: A new mod: Packwar
Code: Select all
StartBuilding(heading, pitch)
{
set INBUILDSTANCE to 1;
}
Re: A new mod: Packwar
Here is my script again:
This should work, but it doesn't. Why is this? My commander still stays put, and nothing gets built.
Code: Select all
#define TA
piece base, turret, nanolathe, nanolathe_emitter, launcher, launcher_emitter;
StartBuilding(heading,pitch)
{
set INBUILDSTANCE to 1;
}
StopBuilding();
{
set INBUILDSTANCE to 0;
}
QueryNanoPiece(piecenum)
{
piecenum = nanolathe_emitter;
}
Re: A new mod: Packwar
Sorry for this big necro post, but I'd like to say I'm working on this mod again with some friends of mine. You can except an alpha version sooner or later.
BTW, is texture animation possible, like for animating tank threads?
BTW, is texture animation possible, like for animating tank threads?
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
Re: A new mod: Packwar
Sort of. It involves hiding / unhiding pieces in the script rather than actually animating the texture though
- Pressure Line
- Posts: 2283
- Joined: 21 May 2007, 02:09
Re: A new mod: Packwar
use lua ^_^
texture co-ordinate translation is awesome. (of course id have to put my pc back together to even begin to work on that...)
texture co-ordinate translation is awesome. (of course id have to put my pc back together to even begin to work on that...)