Nexus Modding > Scripting
The AI and You
The_Small_Time_Modder:
Hi dragon, good to see you chipping in! :)
3a) Im simply looking for code that will make that an OBJECTIVE
3b) i didnt even think of the updating objective part, that i would also gladly appreciate, i dont want to just destroy the raptor ships i have hiding about on the mission im focusing on currently.
EDIT: Problem...
The MakeFullyKnown command wants a ship, not a nav point... you sure thats right?
heres what i have...
--- Code: --- MakeFullyKnown(SOS);
FreezeReconState(SOS,1);
--- End code ---
SOS is the name i have for the navigation point, did i mess up on something? ???
Mularac:
Let us see the declaration of the navpoint, too.
The Old Dragon:
Ok, for the sake of argument, you've added a navpoint via the mission editor called "SOS". In order for the game to be able to see and interact with it, then it'll need a variable name. To assign one, add the following to the SceneInit rule...
M.SOS:=GetSceneObj("SOS");
So our previous commands to make it visible would now read...
MakeFullyKnown(M.SOS);
FreezeReconState(M.SOS,1);
Quick question or two, have you visited the NexusWiki (http://nexusthegame.net/wiki/Beginner%27s_Guide#Nexus:TJI_Basic_mission-making_walkthrough) and read through the beginners tutorials? You'll find what you need on adding and updating Objectives in there. The only bit you won't find there is a trigger for the update...
--- Code: --- RULE event Breached
condition E.location=[size=15pt][color=red]1[/color][/size]&E.ship:launcherWeapon:owner=[size=15pt][color=red]2[/color][/size]
:action
:end
END
--- End code ---
1= The variable name that you declared for the raptor ship.
2= The variable name that you declared for the player ship.
Not overly sure about this, but if you have several ships that carry marines, then try changing the "2" to "race_Player ". This rule should hopefully cover all your ships then.
The_Small_Time_Modder:
Excellent, i got the navpoint working now...
EDIT: i got even better news! the AI for the raptors is now working exactly as i wanted it to in the first place! I had to remove the inclusion of the default AI from the .mission file.
now that i know it works i intend to add more raptor ships into the area. and add large asteroids to hide them.
The_Small_Time_Modder:
OK, the AI part as far as i know is done.
Now i want to have the music change from contact ghost (the one i have playing in the mission) to contact raptor when the AI turns on. Anyone know exactly how?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version