Bearbeiten von „Artemis-mapping

Aus KIF
Warnung: Du bist nicht angemeldet. Deine IP-Adresse wird bei Bearbeitungen öffentlich sichtbar. Melde dich an oder erstelle ein Benutzerkonto, damit Bearbeitungen deinem Benutzernamen zugeordnet werden. Ein eigenes Benutzerkonto hat eine ganze Reihe von Vorteilen.

Die Bearbeitung kann rückgängig gemacht werden. Bitte prüfe den Vergleich unten, um sicherzustellen, dass du dies tun möchtest, und veröffentliche dann unten deine Änderungen, um die Bearbeitung rückgängig zu machen.

Aktuelle Version Dein Text
Zeile 1: Zeile 1:
Codefragmente, Ideenaustausch etc.
Codefragmente, Ideenaustausch etc.


Es gibt einen GUI Editor damit man sich nich den XML Schmerz antun muss:
http://artemiswiki.pbworks.com/w/page/53389687/Mission%20Editor
Aber Achtung: Über den GUI-Editor kann man nicht alles ausreizen. Generic Meshes sind eher dürftig umgesetzt, Gegner funktionieren über XML besser und einfacher.


Drey: baut an Admininterfaces
Drey: baut an Admininterfaces
Zeile 32: Zeile 26:
<set_relative_position name1="player" name2="OBJECT" angle="180" distance="220"/>  
<set_relative_position name1="player" name2="OBJECT" angle="180" distance="220"/>  
</event>  
</event>  
----------------------
  ---------------------
TRACKING SCORE
by Vorus
   
This is a code snippet that must be added to a mission script.
Probably a lot of scripters have their own way of keeping track of players' scores through the mission, but here's how I do it. Create an enemy Elite in one corner of the map, I used the upper-right in this example. Make this enemy invisible to LRS, the main screen, and SCI. That way he can only be seen if the player is RIGHT on top of him. This is step one, as seen here:
<create type ="enemy" x="0" y="0" z="0" name="Score" hulltype="30" fleetnumber="99" angle="90" elite="1"/>
<set_object_property name="Score" property="elite" value="1"/>
<set_object_property name="Score" property="eliteAIType" value="0"/>
<set_object_property name="Score" property="eliteAbilityBits" value="7"/>
Next, make sure he can't move, turn or be killed:
<event>
<if_exists name="Score"/>
<set_object_property name="Score" property="topSpeed" value="0.00001"/>
<set_object_property name="Score" property="turnRate" value="0.00001"/>
<set_object_property name="Score" property="shieldStateFront" value="100"/>
<set_object_property name="Score" property="shieldStateBack" value="100"/>
</event>
If you are really concerned about the fourth wall, you could even create a zone around him that the player can't enter, like this maybe:
<if_inside_sphere name="Artemis" centerX="0" centerY="0" centerZ="0" radius="2000"/>
<set_object_property name="Artemis" property="positionX" value="2500"/>
<set_object_property name="Artemis" property="positionZ" value="2500"/>
But for scoring purposes, you just put in a line like this when the player accomplishes something good:
<addto_object_property name="Score" property="positionY" value="100"/> 
Use a value of 100 because even though you set the ship to never move, it will wiggle a bit, so real fine values like single digits won't work. (You might be able to get away with 10s, but I went with 100s to be safe.) Since you are using the Y axis, the ship should not move much on the map.
You could also have things that detract from the score by just adding a -100.
At the end of the game, you can find out the score, and let the player know how they did like so:
<event>
<if_variable name="endMission" comparator="=" value="1"/>
<if_variable name="gameOver" comparator="!=" value="1"/>
<if_object_property name="Score" property="positionY" comparator="<" value="50"/>
<big_message title="Mission Complete" subtitle1="Score 0/10" subtitle2="You didn't accomplish anything"/>
<set_timer name="endMissionTimer" seconds="20"/>
<set_variable name="gameOver" value="1"/>
<set_variable name="gameScore" value="0"/>
</event>
For each 100 that you move the ship, they get 1 point. You check the value of "positionX" from the 50s instead of even 100s to account for the wiggling I mentioned earlier. So a score of 1 would have the lines:
<if_object_property name="Score" property="positionY" comparator=">" value="50"/>
<if_object_property name="Score" property="positionY" comparator="<=" value="150"/> 
and so on. That's pretty much all you need, just create a separate event to check for each point value, up to your max, and display the appropriate info to the player.
-------------------
Bitte kopiere keine Webseiten, die nicht deine eigenen sind, benutze keine urheberrechtlich geschützten Werke ohne Erlaubnis des Urhebers!
Du gibst uns hiermit deine Zusage, dass du den Text selbst verfasst hast, dass der Text Allgemeingut (public domain) ist oder dass der Urheber seine Zustimmung gegeben hat. Falls dieser Text bereits woanders veröffentlicht wurde, weise bitte auf der Diskussionsseite darauf hin. Bitte beachte, dass alle KIF-Beiträge automatisch unter der „Namensnennung-Weitergabe unter gleichen Bedingungen 2.5 “ stehen (siehe KIF:Urheberrechte für Einzelheiten). Falls du nicht möchtest, dass deine Arbeit hier von anderen verändert und verbreitet wird, dann klicke nicht auf „Seite speichern“.
Abbrechen Bearbeitungshilfe (wird in einem neuen Fenster geöffnet)