Jump to content

Objects already on Map


aus3620

Recommended Posts

The idea is to have an attack on a port.

 

As you will be aware, there are ships already on the map in many of the ports (i.e. not placed by player, they are just there).

 

Can you make/fool the computer into recognising these ships as an object, e.g., be able to send a message to say that "Ship X has been destroyed".

 

Place a speedboat on a ship?

Link to comment
Share on other sites

They are objects :)

 

There are two ways to do it, the easy way and the interesting way.

 

The easy way is to place a speedboat or similar small unit inside/near the ship and monitor that to see if its been killed or not. This works pretty well but its not the most reliable as someone could just kill that speedboat and trigger the message.

 

 

The interesting way is with lua. All objects on the map are known as "scenery objects" and you can run scripting functions on them to get information about them, like whether or not its alive or dead. So if you are itnerested in learning lua its very doable.

 

Also there is the other easy way which requires you to do a little bit with lua, but all of the hard stuff is already done for you. Basically you can use the Mission Scripting Tools in your mission. Within MIST is a function that sets a flag to true once a certain number of scenery objects inside a trigger zone are dead. Simply use this function and another trigger to display the message whenever a flag is set to true. :)

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...