path punkt abfragen

  • GM 6

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • path punkt abfragen

    hallo

    sooo.... hab wiedermal ein problem
    konnte es selbst nicht lösen und hab auch kein ähnliches thema gefunden
    also:

    ein path ist ja aus mehreren punkten gemacht.

    kann man irgendwie abfragen bei welchem punkt das object bei einem path ist?
    und wie kann man einstellen das ein object zb. wenn es den path startet beim 3 punkt des path startet?

    würd mich freuen wenn mir da jemand weiterhelfen kann
    You can fool some people sometimes,

    But you can't fool all the people all the time.
    Bob Marley - Get up, Stand up
  • Einfach mal die Hilfe fragen:


    The following functions will give you information about a path:

    path_exists(ind) Returns whether a path with the given index exists.
    path_get_name(ind) Returns the name of the path with the given index.
    path_get_length(ind) Returns the length of the path with the given index.
    path_get_kind(ind) Returns the kind of connections of the path with the given index (0=straight, 1=smooth).
    path_get_closed(ind) Returns whether the path is closed or not.
    path_get_precision(ind) Returns the precision used for creating smoothed paths.
    path_get_number(ind) Returns the number of defining points for the path.
    path_get_point_x(ind,n) Returns the x-coordinate of the n'th defining point for the path. 0 is the first point.
    path_get_point_y(ind,n) Returns the y-coordinate of the n'th defining point for the path. 0 is the first point.

    path_get_point_speed(ind,n) Returns the speed factor at the n'th defining point for the path. 0 is the first point.
    path_get_x(ind,pos) Returns the x-coordinate at position pos for the path. pos must lie between 0 and 1.
    path_get_y(ind,pos) Returns the y-coordinate at position pos for the path. pos must lie between 0 and 1.
    path_get_speed(ind,pos) Returns the speed factor at position pos for the path. pos must lie between 0 and 1.

    © 2008 by Teamgrill Productions
  • vielleicht stell ich mich jetzt dumm an aber ich weiß nicht was ich davon gebrauchen kann
    mit den sachen kann ich ja nur den path verändern und das will ich ja gar nicht
    oder kapier ich da die beschreibung nicht ? 8| ?(

    aber trotzdem danke
    You can fool some people sometimes,

    But you can't fool all the people all the time.
    Bob Marley - Get up, Stand up
  • Wenn ichs richtig verstanden habe suchst du das hier:
    path_get_point_x(ind,n) Returns the x-coordinate of the n'th defining point for the path. 0 is the first point.
    path_get_point_y(ind,n) Returns the y-coordinate of the n'th defining point for the path. 0 is the first point.
    (Hat er doch extra kursiv geschrieben ;) )

    MfG Waterman7
  • also ich hab das jetzt ausprobiert... auf ein paar verschiedene arten und es hat sich nichts getan...
    so wie ich die erklärung verstehe ändert dieser befehl den punkt. ich würd aber nur gerne abfragen bei welchem punkt das object ist.
    You can fool some people sometimes,

    But you can't fool all the people all the time.
    Bob Marley - Get up, Stand up
  • Returns the x-coordinate of the n'th defining point for the path. 0 is the first point.

    Zu deutsch:
    Gibt die x-Koordinate des
    n'ten Definitionspunktes des path wieder. 0 ist der erste Punkt.

    Also könntest du diesen Punkt in einer Variable speicher :

    punkt = path_get_point_x (ind,n)



  • ah ok danke. ich glaub jetzt hab ichs... nur was mir schon wieder sorgen macht ist:
    0 ist ja der erste punkt im path und 1 ist der letzte punkt... was ist dann der punkt in der mitte?? das kapier ich mal überhaupt nich :headtouch:
    You can fool some people sometimes,

    But you can't fool all the people all the time.
    Bob Marley - Get up, Stand up
  • ah das leuchtet mir schon eher ein. thx ;)
    nur das mit der zahl dahinter klapt nicht 8| ?(

    noch mal ne frage... is jetzt eher eine bitte. :D
    würde vielleicht jemand einen gml code posten wie er folgende situation machen würde:
    das hauptobject heißt jetzt mal "spieler" und das andere object "seil"
    --
    object spieler berührt das object seil
    darauf startet bei dem spieler ein path. jedoch startet das object spieler schon bei dem vierten punkt des path.
    --
    das würde mir jetzt echt weiterhelfen. ich hab selbst keine ahnung wie ich das machen könnte und habe schon etliche möglichkeiten ausprobiert
    You can fool some people sometimes,

    But you can't fool all the people all the time.
    Bob Marley - Get up, Stand up
  • Wie wäre es, wenn du mal deinen Code postest?

    Du sagst hier ständig nur "Das funktioniert nicht, und dies auch nicht, und jenes genauso wenig, warum verdammt? Ich bin es auf verschiedene Weisen angegangen aber keine meiner Methoden funktioniert. Bitte nennt mir eine andere!". Wir können leider nicht hellsehen. Und dir irgenteinen Code vorkauen, für eine größtenteils unbekannte Situation in deinem Code (gibt viele Faktoren die dazu noch eine Rolle spielen), will hier wohl kaum einer.

    Bitte denk immer daran:
    Was müssen wir wissen, um dir zu helfen!

    Wenn du deinen Code postest, oder am besten gleich deine gm6/gmk, dann wird dir mit Sicherheit schnell jemand helfen und du kommst an dein Ziel. ;)

    Vielen Dank für die Aufmerksamkeit
  • ok dann hab ich hier mal meine datei
    ist glaub ich ein großes kuddelmuddel lol

    also der Affe soll das seil berühren und dann soll der path starten. aber er soll in der mitte starten also beim 3 oder 4 punkt.
    Dateien
    • affenspiel.zip

      (23,47 kB, 171 mal heruntergeladen, zuletzt: )
    You can fool some people sometimes,

    But you can't fool all the people all the time.
    Bob Marley - Get up, Stand up