Page 1 of 1

Weapons (EDIT: and wierd scripting problem)

Posted: 05 Nov 2005, 15:58
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?

Posted: 05 Nov 2005, 17:05
by FLOZi
==

:wink:

Posted: 05 Nov 2005, 17:29
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...

Posted: 05 Nov 2005, 19:48
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;

Posted: 05 Nov 2005, 22:38
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...

Posted: 05 Nov 2005, 23:16
by Guessmyname
http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2692

Caydr's post on the fire arcs thing