A new mod: Packwar - Page 3

A new mod: Packwar

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: A new mod: Packwar

Post 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.
Rubenes
Posts: 84
Joined: 27 Apr 2005, 14:28

Re: A new mod: Packwar

Post 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?
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: A new mod: Packwar

Post 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
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: A new mod: Packwar

Post by KDR_11k »

PL, bullshit. StartBuilding is exactly where set INBUILDSTANCE goes.

Can't say what you're doing wrong without seeing the script.
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: A new mod: Packwar

Post by Pressure Line »

x: poos, i got mixed up.
Rubenes
Posts: 84
Joined: 27 Apr 2005, 14:28

Re: A new mod: Packwar

Post 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.
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: A new mod: Packwar

Post 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
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: A new mod: Packwar

Post 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;
}
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: A new mod: Packwar

Post 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 >_<)
Rubenes
Posts: 84
Joined: 27 Apr 2005, 14:28

Re: A new mod: Packwar

Post 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.
Rubenes
Posts: 84
Joined: 27 Apr 2005, 14:28

Re: A new mod: Packwar

Post 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?
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Re: A new mod: Packwar

Post by Guessmyname »

Sort of. It involves hiding / unhiding pieces in the script rather than actually animating the texture though
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: A new mod: Packwar

Post 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...)
Post Reply

Return to “Game Development”