Weapons (EDIT: and wierd scripting problem)

Weapons (EDIT: and wierd scripting problem)

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

Post Reply
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Weapons (EDIT: and wierd scripting problem)

Post by Guessmyname »

To quote Units:Weapons in the wiki:
Slight script changes. While there is nothing drasitc, there are some differences. I do not know all of the differences, but you are bound to stumble across them yourself
I know that the scripts are now AimWeapon1 etc, but are there any other changes?

and
New weapon types. There are now some new weapon types, adding to the ability of the units.
What are these (other than the beam laser)?

Also: What are the tags for setting weapon masters, fire arcs and the like?

EDIT: I've also got an unusual scriptor error. It keeps saying
[178]: Unknown Operator

Line 178 is this:

Code: Select all

 	while (ismoving=1)
I've tried rewriting it. I've tried copying an exact copy of that line that does work (the line is repeated leter on and that line doesn't get this error)

Whats going on?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

==

:wink:
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Post by SinbadEV »

assignment vs logical... like FLOZi said but slightly less cryptic :P

Best case senario would be that because 1 is true and the assignment operator funtion's value is the right side operand... aka

(blah=3) == 3

and any positive value is true... then the while statement would always be true and the loop would never break...
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

Oh bugger! Forgot all about the == thing...

Script works now

EDIT: Does the weaponslave thing work like this if I want to slave weapon 2 to weapon 1, or would it be the other way around?

Code: Select all

	WeaponSlaveToWeapon2=Weapon1;
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

WeaponSlaveTo2=1; would slave Weapon2 to Weapon1. You can't go the other way; Weapon1 can never be slaved to any other weapon. The slave must always be a higher number than the... owner, or whatever you want to call it.

The other new weapon tags are "Wobble", which is exactly like TurnRate except it makes projectiles vary on their path to the target, and "TrajectoryHeight" which is only for missiles. I'll let the changelog explain:
-Added missile tdf tag wobble, this is in the same as turnrate except that it will turn in random directions instead of toward the target,default 0
-Added missile tdf tag trajectoryHeight, this sets in how high an arc the missile will move toward the target,0 = straight, 1=45 degree above, can be anything>=0, default 0
[edit] Also, Wobble is greatly influenced by the various velocity and acceleration tags in the weapon TDF. A fast projectile will need a higher wobble or a lower speed to make a noticable wobble. [/edit]

Fire arcs are a bit interesting. I recommend reading the post Caydr posted about them in... I think the Help forum. It had graphical diagrams and everything.

Really, for the most part, you just need to read the changelog to find new tags...
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2692

Caydr's post on the fire arcs thing
Post Reply

Return to “Game Development”