Ergebnis 1 bis 20 von 28

Thema: X/Y-Radius berechnen

Hybrid-Darstellung

Vorheriger Beitrag Vorheriger Beitrag   Nächster Beitrag Nächster Beitrag
  1. #1

    Users Awaiting Email Confirmation

    Ich danke euch allen für die Hilfe

    Ich habe aber noch eine Frage:

    Man kann ja den Abstand zwischen 2 Events errechnen,
    wie siehts denn aber aus,wenn das ganze nur in eine Richtung gehene soll?
    Bezüglich einzelner Hiebe im AKS,ebenfalls im Halbkreis?
    Bsp:
    Held schaut nach oben.
    Nun soll er nicht nur das Feld direkt vor ihm treffen,sondern 1. die beiden daneben und 2. noch das Feld darüber...

    Geändert von Engel der Furcht (09.01.2010 um 14:42 Uhr)

  2. #2

    Users Awaiting Email Confirmation

    Kann mir denn keiner Helfen?
    hier mal eine "bildliche Darstellung",wie ich das meine.


    Blickt der Held nach oben,sollen die 2 Felder diagonal über ihn und 2 Felder direkt über ihn abgefragt werden.
    Muss ich dafür jedes Feld einzeln nachhaken,oder gibt es dazu auch eine Rechenformel?

  3. #3
    Also wenn ich das richtige sehe, dann ist das ja nichts weiter als ein kleiner Radius, den du mit der bereits bekannten Formel errechnen kannst. Du musst hier halt eben nur den Mittelpunkt des Radius je nach Blickrichtung des Helden in die richtige Richtung schieben (X- oder Y-Koordinate +/- eins).
    Das Tile auf dem der Held steht fällt ja ohnehin automatisch weg, weil da ja niemals gleichzeitig ein Gegner stehen kann^_-

    Gruß
    Stoep

  4. #4

    Users Awaiting Email Confirmation

    So,
    Dank Cilence bin ich glaube ich auf den richtigen Weg...

    so sieht der momentane Code aus.
    "attack2" dient nur zu Testzwecken.
    Jetzt will ich nurnoch wissen,wie ich es schaffen,dass nur vor dem Helden und nicht hinter ihm abgefragt wird...

  5. #5

    Users Awaiting Email Confirmation

    Sorry für Doppelpost...
    Aber ich habs geschafft,wenn auch total umständlich.
    Code:
    - SCRIPT -
    <> Change Variable: [121] = X position on map (tiles) of hero
    <> Change Variable: [122] = Y position on map (tiles) of hero
    <> Change Variable: [125] = V[121]
    <> Change Variable: [126] = V[122]
    <> Fork Condition: If Hero is facing up then ...
     <> Change Variable: [126] -= 1
     <> Get Event ID: (V[125], V[126]), Store in var. [127]
     <> Fork Condition: If Variable [127] == 1 then ...
      <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
      <> Change Switch: [31] = ON
      <>
     : Else ...
      <> Fork Condition: If Variable [127] == 2 then ...
       <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
       <> Change Switch: [32] = ON
       <>
      : Else ...
       <> Fork Condition: If Variable [127] == 3 then ...
        <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
        <> Change Switch: [33] = ON
        <>
       : Else ...
        <> Change Variable: [125] -= 1
        <> Get Event ID: (V[125], V[126]), Store in var. [127]
        <> Fork Condition: If Variable [127] == 1 then ...
         <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
         <> Change Switch: [31] = ON
         <>
        : Else ...
         <> Fork Condition: If Variable [127] == 2 then ...
          <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
          <> Change Switch: [32] = ON
          <>
         : Else ...
          <> Fork Condition: If Variable [127] == 3 then ...
           <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
           <> Change Switch: [33] = ON
           <>
          : Else ...
           <> Change Variable: [125] += 2
           <> Get Event ID: (V[125], V[126]), Store in var. [127]
           <> Fork Condition: If Variable [127] == 1 then ...
            <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
            <> Change Switch: [31] = ON
            <>
           : Else ...
            <> Fork Condition: If Variable [127] == 2 then ...
             <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
             <> Change Switch: [32] = ON
             <>
            : Else ...
             <> Fork Condition: If Variable [127] == 3 then ...
              <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
              <> Change Switch: [33] = ON
              <>
             : Else ...
              <> Change Variable: [125] -= 1
              <> Change Variable: [126] -= 1
              <> Get Event ID: (V[125], V[126]), Store in var. [127]
              <> Fork Condition: If Variable [127] == 1 then ...
               <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
               <> Change Switch: [31] = ON
               <>
              : Else ...
               <> Fork Condition: If Variable [127] == 2 then ...
                <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
                <> Change Switch: [32] = ON
                <>
               : Else ...
                <> Fork Condition: If Variable [127] == 3 then ...
                 <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
                 <> Change Switch: [33] = ON
                 <>
                : Else ...
                 <>
                : End of fork
                <>
               : End of fork
               <>
              : End of fork
              <>
             : End of fork
             <>
            : End of fork
            <>
           : End of fork
           <>
          : End of fork
          <>
         : End of fork
         <>
        : End of fork
        <>
       : End of fork
       <>
      : End of fork
      <>
     : End of fork
     <>
    : Else ...
     <>
    : End of fork
    <> Comment: 
    :        
    :        
    <> Fork Condition: If Hero is facing right then ...
     <> Change Variable: [125] += 1
     <> Get Event ID: (V[125], V[126]), Store in var. [127]
     <> Fork Condition: If Variable [127] == 1 then ...
      <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
      <> Change Switch: [31] = ON
      <>
     : Else ...
      <> Fork Condition: If Variable [127] == 2 then ...
       <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
       <> Change Switch: [32] = ON
       <>
      : Else ...
       <> Fork Condition: If Variable [127] == 3 then ...
        <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
        <> Change Switch: [33] = ON
        <>
       : Else ...
        <> Change Variable: [126] -= 1
        <> Get Event ID: (V[125], V[126]), Store in var. [127]
        <> Fork Condition: If Variable [127] == 1 then ...
         <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
         <> Change Switch: [31] = ON
         <>
        : Else ...
         <> Fork Condition: If Variable [127] == 2 then ...
          <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
          <> Change Switch: [32] = ON
          <>
         : Else ...
          <> Fork Condition: If Variable [127] == 3 then ...
           <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
           <> Change Switch: [33] = ON
           <>
          : Else ...
           <> Change Variable: [126] += 2
           <> Get Event ID: (V[125], V[126]), Store in var. [127]
           <> Fork Condition: If Variable [127] == 1 then ...
            <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
            <> Change Switch: [31] = ON
            <>
           : Else ...
            <> Fork Condition: If Variable [127] == 2 then ...
             <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
             <> Change Switch: [32] = ON
             <>
            : Else ...
             <> Fork Condition: If Variable [127] == 3 then ...
              <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
              <> Change Switch: [33] = ON
              <>
             : Else ...
              <> Change Variable: [126] -= 1
              <> Change Variable: [125] += 1
              <> Get Event ID: (V[125], V[126]), Store in var. [127]
              <> Fork Condition: If Variable [127] == 1 then ...
               <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
               <> Change Switch: [31] = ON
               <>
              : Else ...
               <> Fork Condition: If Variable [127] == 2 then ...
                <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
                <> Change Switch: [32] = ON
                <>
               : Else ...
                <> Fork Condition: If Variable [127] == 3 then ...
                 <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
                 <> Change Switch: [33] = ON
                 <>
                : Else ...
                 <>
                : End of fork
                <>
               : End of fork
               <>
              : End of fork
              <>
             : End of fork
             <>
            : End of fork
            <>
           : End of fork
           <>
          : End of fork
          <>
         : End of fork
         <>
        : End of fork
        <>
       : End of fork
       <>
      : End of fork
      <>
     : End of fork
     <>
    : Else ...
     <>
    : End of fork
    <> Comment: 
    :        
    :        
    <> Fork Condition: If Hero is facing down then ...
     <> Change Variable: [126] += 1
     <> Get Event ID: (V[125], V[126]), Store in var. [127]
     <> Fork Condition: If Variable [127] == 1 then ...
      <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
      <> Change Switch: [31] = ON
      <>
     : Else ...
      <> Fork Condition: If Variable [127] == 2 then ...
       <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
       <> Change Switch: [32] = ON
       <>
      : Else ...
       <> Fork Condition: If Variable [127] == 3 then ...
        <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
        <> Change Switch: [33] = ON
        <>
       : Else ...
        <> Change Variable: [125] -= 1
        <> Get Event ID: (V[125], V[126]), Store in var. [127]
        <> Fork Condition: If Variable [127] == 1 then ...
         <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
         <> Change Switch: [31] = ON
         <>
        : Else ...
         <> Fork Condition: If Variable [127] == 2 then ...
          <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
          <> Change Switch: [32] = ON
          <>
         : Else ...
          <> Fork Condition: If Variable [127] == 3 then ...
           <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
           <> Change Switch: [33] = ON
           <>
          : Else ...
           <> Change Variable: [125] += 2
           <> Get Event ID: (V[125], V[126]), Store in var. [127]
           <> Fork Condition: If Variable [127] == 1 then ...
            <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
            <> Change Switch: [31] = ON
            <>
           : Else ...
            <> Fork Condition: If Variable [127] == 2 then ...
             <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
             <> Change Switch: [32] = ON
             <>
            : Else ...
             <> Fork Condition: If Variable [127] == 3 then ...
              <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
              <> Change Switch: [33] = ON
              <>
             : Else ...
              <> Change Variable: [125] -= 1
              <> Change Variable: [126] += 1
              <> Get Event ID: (V[125], V[126]), Store in var. [127]
              <> Fork Condition: If Variable [127] == 1 then ...
               <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
               <> Change Switch: [31] = ON
               <>
              : Else ...
               <> Fork Condition: If Variable [127] == 2 then ...
                <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
                <> Change Switch: [32] = ON
                <>
               : Else ...
                <> Fork Condition: If Variable [127] == 3 then ...
                 <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
                 <> Change Switch: [33] = ON
                 <>
                : Else ...
                 <>
                : End of fork
                <>
               : End of fork
               <>
              : End of fork
              <>
             : End of fork
             <>
            : End of fork
            <>
           : End of fork
           <>
          : End of fork
          <>
         : End of fork
         <>
        : End of fork
        <>
       : End of fork
       <>
      : End of fork
      <>
     : End of fork
     <>
    : Else ...
     <>
    : End of fork
    <> Comment: 
    :        
    :        
    <> Fork Condition: If Hero is facing left then ...
     <> Change Variable: [125] -= 1
     <> Get Event ID: (V[125], V[126]), Store in var. [127]
     <> Fork Condition: If Variable [127] == 1 then ...
      <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
      <> Change Switch: [31] = ON
      <>
     : Else ...
      <> Fork Condition: If Variable [127] == 2 then ...
       <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
       <> Change Switch: [32] = ON
       <>
      : Else ...
       <> Fork Condition: If Variable [127] == 3 then ...
        <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
        <> Change Switch: [33] = ON
        <>
       : Else ...
        <> Change Variable: [126] -= 1
        <> Get Event ID: (V[125], V[126]), Store in var. [127]
        <> Fork Condition: If Variable [127] == 1 then ...
         <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
         <> Change Switch: [31] = ON
         <>
        : Else ...
         <> Fork Condition: If Variable [127] == 2 then ...
          <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
          <> Change Switch: [32] = ON
          <>
         : Else ...
          <> Fork Condition: If Variable [127] == 3 then ...
           <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
           <> Change Switch: [33] = ON
           <>
          : Else ...
           <> Change Variable: [126] += 2
           <> Get Event ID: (V[125], V[126]), Store in var. [127]
           <> Fork Condition: If Variable [127] == 1 then ...
            <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
            <> Change Switch: [31] = ON
            <>
           : Else ...
            <> Fork Condition: If Variable [127] == 2 then ...
             <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
             <> Change Switch: [32] = ON
             <>
            : Else ...
             <> Fork Condition: If Variable [127] == 3 then ...
              <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
              <> Change Switch: [33] = ON
              <>
             : Else ...
              <> Change Variable: [126] -= 1
              <> Change Variable: [125] -= 1
              <> Get Event ID: (V[125], V[126]), Store in var. [127]
              <> Fork Condition: If Variable [127] == 1 then ...
               <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
               <> Change Switch: [31] = ON
               <>
              : Else ...
               <> Fork Condition: If Variable [127] == 2 then ...
                <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
                <> Change Switch: [32] = ON
                <>
               : Else ...
                <> Fork Condition: If Variable [127] == 3 then ...
                 <> Play Sound Effect: strike11, Volume 100%, Speed 100%, Pan Center
                 <> Change Switch: [33] = ON
                 <>
                : Else ...
                 <>
                : End of fork
                <>
               : End of fork
               <>
              : End of fork
              <>
             : End of fork
             <>
            : End of fork
            <>
           : End of fork
           <>
          : End of fork
          <>
         : End of fork
         <>
        : End of fork
        <>
       : End of fork
       <>
      : End of fork
      <>
     : End of fork
     <>
    : Else ...
     <>
    : End of fork
    <> Change Switch: [19] = OFF
    Jedes Feld einzeln abhaken war eine Aufgabe die innerhalb von 30 Sekunden erledigt ist...

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •