Iscripting question?

Post Reply
User avatar
Ardis
Terran Nuclear Silo Safety Inspector
Terran Nuclear Silo Safety Inspector
Posts: 228
Joined: Tue Sep 05, 2006 5:03 pm
Location: Ohio, USA

Iscripting question?

Post 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.
I'm not unstable.
Unstable implies that I could BECOME more dangerous than I am now.
User avatar
Taeradun
Protoss Khalai Missionary
Protoss Khalai Missionary
Posts: 1028
Joined: Thu Sep 07, 2006 6:08 pm
Location: AU
Contact:

Re: Iscripting question?

Post 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.
Image
User avatar
Ardis
Terran Nuclear Silo Safety Inspector
Terran Nuclear Silo Safety Inspector
Posts: 228
Joined: Tue Sep 05, 2006 5:03 pm
Location: Ohio, USA

Re: Iscripting question?

Post 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.
Last edited by Ardis on Sun Dec 09, 2007 10:53 am, edited 1 time in total.
I'm not unstable.
Unstable implies that I could BECOME more dangerous than I am now.
Post Reply