Page 3 of 3

Re: A new mod: Packwar

Posted: 23 Dec 2007, 15:01
by KDR_11k
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

Posted: 24 Dec 2007, 16:00
by Rubenes
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?

Re: A new mod: Packwar

Posted: 24 Dec 2007, 23:59
by Pressure Line
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 :P

Re: A new mod: Packwar

Posted: 25 Dec 2007, 10:01
by KDR_11k
PL, bullshit. StartBuilding is exactly where set INBUILDSTANCE goes.

Can't say what you're doing wrong without seeing the script.

Re: A new mod: Packwar

Posted: 25 Dec 2007, 10:25
by Pressure Line
x: poos, i got mixed up.

Re: A new mod: Packwar

Posted: 25 Dec 2007, 10:42
by Rubenes
This is my script ATM:

Code: Select all

#define TA
piece base, turret, nano, nano_emitter, rocket, rocket_emitter

StartBuilding()
{
       set INBUILDSTANCE to 1;
}
StopBuilding()
{
       set INBUILDSTANCE to 0;
}
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.

Re: A new mod: Packwar

Posted: 25 Dec 2007, 10:50
by Pressure Line
you need to add:

Code: Select all

QueryNanoPiece(piecenum)
{
	piecenum = nano_emitter; //or whatever you want the nanostream to come from
}
to your script

Re: A new mod: Packwar

Posted: 25 Dec 2007, 11:43
by FLOZi
for compatibility with 0.76 you should provide StartBuilding with two arguments i.e.

Code: Select all

StartBuilding(heading, pitch) {
  set INBUILDDISTANCE to 1;
}

Re: A new mod: Packwar

Posted: 25 Dec 2007, 13:44
by Pressure Line

Code: Select all

StartBuilding(heading, pitch)
{
  set INBUILDSTANCE to 1;
}
corrected, its STANCE not DISTANCE (although my brain always changes it to DISTANCE >_<)

Re: A new mod: Packwar

Posted: 25 Dec 2007, 18:26
by Rubenes
Here is my script again:

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;
}
This should work, but it doesn't. Why is this? My commander still stays put, and nothing gets built.

Re: A new mod: Packwar

Posted: 08 Mar 2008, 10:29
by Rubenes
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?

Re: A new mod: Packwar

Posted: 08 Mar 2008, 10:48
by Guessmyname
Sort of. It involves hiding / unhiding pieces in the script rather than actually animating the texture though

Re: A new mod: Packwar

Posted: 10 Mar 2008, 00:07
by Pressure Line
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...)