Page 1 of 1

Iscripting question?

Posted: Sat Dec 08, 2007 11:31 pm
by Ardis
Okay, for the mod I'm making, I wanted the Terran buildings to be able to turn while airborne, not just face one direction and possibly make one able to attack. The person who did the iscripting for my mod disappeared and even if he didn't, he refused to try this idea because of certain problems. I decided that if I wanted my idea to work, I'd have to do it myself.

Now the problem is, while I think I've figured out how to make it able to turn while airborne. I remember a bug that my iscripter told me about with a similar unit made before in a different mod. You may remember the old Colossus mod. He told me that there were bugs that would set off it the unit hadn't been facing a certain direction when it went into its building mode.

What I had in mind was that using iscripting, I could make the unit automatically face that specific direction before it lands as to avoid the bug he described.
delta1games2005 wrote:It is indeed impossible. There was a mod, an ancient one, which brought a ship-building known as Colossus (DON"T CONFUSE IT WITH THE SC2 PROTOSS UNIT!!!), however, everywhere you clicked, the ship turned on it's production mode, and the exits were blocked if not put on the right direction, and the makers never fixed that bug. No, I think it's better we leave the buildings in one direction. But, heh, that's me.
So, my two questions are these:
1) How do I order units to turn and face a specific direction? I only know how to make them turn from their current position.
2) What direction do I need to make a building face?

Also, any other suggestions/warnings (about potential bugs) that could help get this idea off the ground would be nice.

Re: Iscripting question?

Posted: Sun Dec 09, 2007 8:59 am
by Taeradun
Useful iscript commands, taken from iscript opcodes.txt with the latest version of IceCC:
    * curdirectcondjmp  0x3c - - only for units. Jump to a code block if the current sprite is facing a particular direction.

    * setfldirect      0x34 - - sets the current direction of the flingy.
I haven't used these at all so they might not work in all situations. The commands might be called something else in earlier versions. I dunno what values mean which direction but it might be in one of the other IceCC text files or Mesk might know; but it shouldn't be too hard to find out.

Re: Iscripting question?

Posted: Sun Dec 09, 2007 10:04 am
by Ardis
Yeah, I saw the fldirect earlier this morning when I was looking at the siege tanks iscript data. Thanks.

Now, I just need to know the direction to set it to face when it's landing. EDIT: Never mind, I found it. It's zero.