kann mir wer <event_hack_started/> erklären?

Hier ist der ideale Ort um über Scripts und Mods für X Rebirth zu diskutieren.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
STB2199
Posts: 184
Joined: Fri, 15. Aug 14, 08:38
x4

kann mir wer <event_hack_started/> erklären?

Post by STB2199 » Thu, 26. Feb 15, 17:52

Hallo an alle

könnt ihr mir erklären wie ich

<event_hack_aborted/>
<event_hack_finished/>
<event_hack_started/>

einsetzen kann an ein Beispiel?
Habe nichts Passendes in der Plot Gefunden, da haben sie es anders gelöst!
Last edited by STB2199 on Fri, 27. Feb 15, 15:23, edited 2 times in total.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Thu, 26. Feb 15, 18:04

die Doku in der common.xsd hilft dir nicht weiter? ich wüsste nicht was es da sonst gross zu erklären gibt..

Code: Select all

      <xs:element name="event_hack_aborted">
        <xs:annotation>
          <xs:documentation>
            Event for when a hack is aborted (requires attribute hacker and/or hacked) (object = hacker if supplied, otherwise hacked, param = the other object)
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:attributeGroup ref="eventcondition" />
          <xs:attribute name="hacked" type="hackedrequired" />
          <xs:attribute name="hacker" type="hackerrequired" />
        </xs:complexType>
      </xs:element>

      <xs:element name="event_hack_finished">
        <xs:annotation>
          <xs:documentation>
            Event for when a hack is finished (requires attribute hacker and/or hacked) (object = hacker if supplied, otherwise hacked, param = the other object)
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:attributeGroup ref="eventcondition" />
          <xs:attribute name="hacked" type="hackedrequired" />
          <xs:attribute name="hacker" type="hackerrequired" />
        </xs:complexType>
      </xs:element>

      <xs:element name="event_hack_started">
        <xs:annotation>
          <xs:documentation>
            Event for when a hack is started (requires attribute hacker and/or hacked) (object = hacker if supplied, otherwise hacked, param = the other object)
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:attributeGroup ref="eventcondition" />
          <xs:attribute name="hacked" type="hackedrequired" />
          <xs:attribute name="hacker" type="hackerrequired" />
        </xs:complexType>
      </xs:element>

      <xs:element name="event_object_hacked">
        <xs:annotation>
          <xs:documentation>
            Event for when an object is hacked (requires attribute hacker and/or hacked) (object = hacker if supplied, otherwise hacked, param = the other object)
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:attributeGroup ref="eventcondition" />
          <xs:attribute name="hacked" type="hackedrequired" />
          <xs:attribute name="hacker" type="hackerrequired" />
        </xs:complexType>
      </xs:element>
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

STB2199
Posts: 184
Joined: Fri, 15. Aug 14, 08:38
x4

Post by STB2199 » Fri, 27. Feb 15, 15:25

ich meine was ich in hacked Eintragen muss oder sollte damit das Funktioniert?

ich meine <Event_hack_finished hacked="?" hacker="?"/>

Cappy1401
Posts: 313
Joined: Sun, 27. Apr 08, 02:16
x4

Post by Cappy1401 » Sat, 28. Feb 15, 17:48

STB2199 wrote:ich meine was ich in hacked Eintragen muss oder sollte damit das Funktioniert?

ich meine <Event_hack_finished hacked="?" hacker="?"/>

<event_hack_finished> Wird von der Engine erzeugt wenn ein Objekt gehackt wird

Es beinhaltet dabei zwei Parameter die vom Cue abgefragt werden.

1.)
HACKED="?" ist das Objekt von dem Du wissen willst ob es gehackt wurde. z.B. Waffenkontrolle

2.)
HACKER="?" ist der, wo Du wissen willst, ob er das Object gehackt hat.

Bis jetzt kann nur der Spieler Objekte Hacken, so weit ich weis.

Somit ist bis jetzt der hacker immer "entity.player"

Das ganze mal als Satz.

Wurde das Objekt hacked="Verteidigungscontrollpanel" von hacker="Spieler" gehakt? JA oder NEIN

Je nach dem was Sache ist, wird entweder "true = 1" für JA oder "false = 0" für NEIN zurückgeleifert.

Wird "true = 1" zurückgeleifert wird das CUE also ausgeführt bei "false = 0" wird es nicht ausgeführt.


Beim Plot ist es anders gelöst, da dort keine Panels oder Coputer gehackt werden.
Der Spieler Hackt im Plot mit der Hilfe einer Hackerdrohne bestimmte Punkte von Außerhalb der Station.
z.B. damit er bei der Xeneonstation an das Dock andocken kann, um die Bombe zu platzieren.

Kleines Beispiel für eine Mögliche Art der Abfrage, wobei der Hacker der Spieler ist.
Ich weis jetzt nur nicht welche Objekte es im ganzen gibt, die man an Bord einer Station Hacken kann.

Code: Select all

<mdscript name="Hackerabfrage" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">
	<cues>
		<cue name="IstHacked" instantiate="true" namespace="this" >
			<conditions>
				<check_any>
					<event_hack_finished />
				</check_any>
			</conditions>
			<actions>
			<do_if value="event.name" exact="'event_hack_finished' and event.param.{2} == entity.player">
				<set_value name="$hacked_Objekt" exact="event.param.{1}" />
				<set_value name="$Objekt_hacker" exact="event.param.{2}" />
				Hier das weitere was Du dann tun willst
			</do_if >
			</actions>
		</cue>
	</cues>
</mdscript>


Gruß Cappy1401
Jedes Kriegsschiff, das unsere Werften verlässt, jedes abgefeuerte Geschütz bedeutet letztlich einen Diebstahl an denen, die sich nicht wehren können, nämlich an unseren Kindern. Eine Welt bewaffnet bis an die Zähne feuert nicht nur gebündelte Energie allein. Sie feuert auch oft genug die Hoffnung ihrer Kinder nutzlos in den Weltraum hinaus. Doch hin und wieder lässt man uns keine Wahl, dann jedoch besteht jede Salve aus der geballten Hoffnung das endlich wieder Frieden herrscht.

Der Amazone

Post Reply

Return to “X Rebirth - Scripts und Modding”