Home   Help Search Login Register  

Author Topic: Object ID's  (Read 569 times)

0 Members and 3 Guests are viewing this topic.

soupcan

  • Guest
Object ID's
« on: 04 Sep 2005, 17:39:33 »
I'm trying to make a mission where Lipany is besieged and taking fire. To do this (AFAIK) I need helos, AT's, and tanks to shoot at buildings and walls. So the obvious thing to do is to check the ID's and do one of those this dofire ID, but for some reason it won't accept numeral ID's and everything I want destroyed HAS numeral ID's.

So, is there some fancy work-around to this problem (I'm new to scripting), or should I just say screw it, or what

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:Object ID's
« Reply #1 on: 04 Sep 2005, 17:43:40 »
object, sir, a good old object is what you are missing. OFP cannot refer to a string of numbers unless you tell the game it's an object first. Also, it might be a good idea to tell the unit to target the desired object before it fires.

Try this:
Code: [Select]
nameOfUnit doTarget (object 123456)
nameOfUnit doFire (object 123456)

I'm not sure if the brackets () are needed, but I don't think they will disrupt the code in any way. I've never tried to get the AI to target and fired at a map object, but I cannot see any reason why it shouldn't be possible.
« Last Edit: 04 Sep 2005, 21:15:49 by nominesine »
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:Object ID's
« Reply #2 on: 05 Sep 2005, 04:00:27 »
I'm pretty sure that the brackets are needed for the string to work properly.

Just be warned that several types of houses, fences and other objects cannot be destroyed by shooting them. Of course, some will. So just keep that in mind.
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08