mit Collisionentity-rückgabe auf typen zugreifen
Übersicht

FBI-blitzBetreff: mit Collisionentity-rückgabe auf typen zugreifen |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Also, ich hab ein Typ namens Mesh.
Type Mesh field Objekt field Beschreibung field Energie end type Jetzt bekomm ich bei collisionentity ne Nummer zurück, mit der ich das MEsh auch ansprechen kann. Wie kann ich jetzt auf die Energie oder Beschreibung zugreifen? Ich brauch das für ein Adventure: Wenn man mit einem Mesh kollidiert, dann blinkt es, und die MEshbeschreibung soll ausgegeben werden! |
||
Computer 1: AMD Athlon64 3500+ | nVidia GF 7900GT | 1024 MB DDR-RAM | ASUS A8N-SLI Preimium | 250 GB SATA 2 || WindowsXP | Blitz3D | Blitz+
Computer 2: AMD AthlonXP 2400+ | ATI Radeon 9500 | 512 MB DDR-RAM | MSI K7N2 | 80 GB IDE | 160 GB IDE || WindowsXP | Blitz3D | Blitz+ Computer 3: Intel Pentium MMX | onBoard-Grafik | 32 MB RAM | 1 GB IDE || Windows 98 SE | Blitz+ |
- Zuletzt bearbeitet von FBI-blitz am Di, März 08, 2005 21:25, insgesamt einmal bearbeitet
![]() |
Alfadur |
![]() Antworten mit Zitat ![]() |
---|---|---|
steht doch alles im type tutorial... auf die felder bei nem type greift man über \ zu... also mesh\energie... | ||
A Cray is the only computer that runs an endless loop in less than four hours. |
![]() |
simi |
![]() Antworten mit Zitat ![]() |
---|---|---|
Hi,
es gibt keine bessere Lösung, als alle Type-Einträge durchzugehen, bis der richtige kommt: Code: [AUSKLAPPEN] for m.mesh = each mesh if m\objekt = cllideId then Text 10,10,m\Beschreibung:exit next |
||
FBI-blitz |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Danke, Simi!
Dann versuch ichs mal... |
||
Computer 1: AMD Athlon64 3500+ | nVidia GF 7900GT | 1024 MB DDR-RAM | ASUS A8N-SLI Preimium | 250 GB SATA 2 || WindowsXP | Blitz3D | Blitz+
Computer 2: AMD AthlonXP 2400+ | ATI Radeon 9500 | 512 MB DDR-RAM | MSI K7N2 | 80 GB IDE | 160 GB IDE || WindowsXP | Blitz3D | Blitz+ Computer 3: Intel Pentium MMX | onBoard-Grafik | 32 MB RAM | 1 GB IDE || Windows 98 SE | Blitz+ |
FBI-blitz |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Gibt es denn noch ne andere Möglichkeit, diese "Nummer" rauszukriegen? | ||
Computer 1: AMD Athlon64 3500+ | nVidia GF 7900GT | 1024 MB DDR-RAM | ASUS A8N-SLI Preimium | 250 GB SATA 2 || WindowsXP | Blitz3D | Blitz+
Computer 2: AMD AthlonXP 2400+ | ATI Radeon 9500 | 512 MB DDR-RAM | MSI K7N2 | 80 GB IDE | 160 GB IDE || WindowsXP | Blitz3D | Blitz+ Computer 3: Intel Pentium MMX | onBoard-Grafik | 32 MB RAM | 1 GB IDE || Windows 98 SE | Blitz+ |
FBI-blitz |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Gibt es da noch ein Befehl? | ||
Computer 1: AMD Athlon64 3500+ | nVidia GF 7900GT | 1024 MB DDR-RAM | ASUS A8N-SLI Preimium | 250 GB SATA 2 || WindowsXP | Blitz3D | Blitz+
Computer 2: AMD AthlonXP 2400+ | ATI Radeon 9500 | 512 MB DDR-RAM | MSI K7N2 | 80 GB IDE | 160 GB IDE || WindowsXP | Blitz3D | Blitz+ Computer 3: Intel Pentium MMX | onBoard-Grafik | 32 MB RAM | 1 GB IDE || Windows 98 SE | Blitz+ |
Gerhard |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Aus dem englischen Code-Archiv:
Code-archives/3D-Graphics-Misc Fast Entity Find by David Bird(Birdie) This is a method of storing a pointer(handle) to an entity so that information can be quickly found and used effectivly Oder: Direct entity-to-type relation Vielleicht hilft es... |
||
FBI-blitz |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Ist dieser Befehl das richtige?
http://www.blitzbase.de/befehle2d/object.htm |
||
Computer 1: AMD Athlon64 3500+ | nVidia GF 7900GT | 1024 MB DDR-RAM | ASUS A8N-SLI Preimium | 250 GB SATA 2 || WindowsXP | Blitz3D | Blitz+
Computer 2: AMD AthlonXP 2400+ | ATI Radeon 9500 | 512 MB DDR-RAM | MSI K7N2 | 80 GB IDE | 160 GB IDE || WindowsXP | Blitz3D | Blitz+ Computer 3: Intel Pentium MMX | onBoard-Grafik | 32 MB RAM | 1 GB IDE || Windows 98 SE | Blitz+ |
![]() |
simi |
![]() Antworten mit Zitat ![]() |
---|---|---|
Nö, es geht nicht anders..... (sonst schlagt mich) | ||
FBI-blitz |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Hmm... Dann schreib ich mal ne Function! Die Nummer bleibt ja immer gleich, sodass ich vor der Hauptschleife mit allen Objekten kollidiere, und so die Nummer rausfinde! | ||
Computer 1: AMD Athlon64 3500+ | nVidia GF 7900GT | 1024 MB DDR-RAM | ASUS A8N-SLI Preimium | 250 GB SATA 2 || WindowsXP | Blitz3D | Blitz+
Computer 2: AMD AthlonXP 2400+ | ATI Radeon 9500 | 512 MB DDR-RAM | MSI K7N2 | 80 GB IDE | 160 GB IDE || WindowsXP | Blitz3D | Blitz+ Computer 3: Intel Pentium MMX | onBoard-Grafik | 32 MB RAM | 1 GB IDE || Windows 98 SE | Blitz+ |
![]() |
Alfadur |
![]() Antworten mit Zitat ![]() |
---|---|---|
außerdem ist es doch ok alle types mit for each zu durchsuchen, das geht so schnell, von der performance wirst du da keine unterschiede merken... | ||
A Cray is the only computer that runs an endless loop in less than four hours. |
FBI-blitz |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Könnt ihr mir mal ein kleines Beispiel mit For...each geben?
Wie mein Typ selbst aussieht, wisst ihr ja! Jetzt habe ich folgendes gemacht: Code: [AUSKLAPPEN] objekte.mesh(100) for temp = 0 to 100 objekte.mesh(temp) = new mesh ... ;JEtzt werden die objekte geladen (NAch objekte\objekt) ... next ... ;Kollision colobjekt = entitycollide(...) Wie muss die Schleife jetzt aus sehen? Vor allem, wie geht das mit den Dim-Feldern? |
||
Computer 1: AMD Athlon64 3500+ | nVidia GF 7900GT | 1024 MB DDR-RAM | ASUS A8N-SLI Preimium | 250 GB SATA 2 || WindowsXP | Blitz3D | Blitz+
Computer 2: AMD AthlonXP 2400+ | ATI Radeon 9500 | 512 MB DDR-RAM | MSI K7N2 | 80 GB IDE | 160 GB IDE || WindowsXP | Blitz3D | Blitz+ Computer 3: Intel Pentium MMX | onBoard-Grafik | 32 MB RAM | 1 GB IDE || Windows 98 SE | Blitz+ |
![]() |
simi |
![]() Antworten mit Zitat ![]() |
---|---|---|
Code: [AUSKLAPPEN] for tmp = 0 to 100 if mesh(tmp)\objekt = colobjekt then colobject = tmp:exit next print mesh(colobject)\beschreibung .... (nicht getestet, sollte aber gehen... |
||
FBI-blitz |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Mann, bin ich doof! So gehts natürlich auch! Mann, mann, mann...
Danke, Simi und alle anderen! |
||
Computer 1: AMD Athlon64 3500+ | nVidia GF 7900GT | 1024 MB DDR-RAM | ASUS A8N-SLI Preimium | 250 GB SATA 2 || WindowsXP | Blitz3D | Blitz+
Computer 2: AMD AthlonXP 2400+ | ATI Radeon 9500 | 512 MB DDR-RAM | MSI K7N2 | 80 GB IDE | 160 GB IDE || WindowsXP | Blitz3D | Blitz+ Computer 3: Intel Pentium MMX | onBoard-Grafik | 32 MB RAM | 1 GB IDE || Windows 98 SE | Blitz+ |
FBI-blitz |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Alfadur hat Folgendes geschrieben: außerdem ist es doch ok alle types mit for each zu durchsuchen, das geht so schnell, von der performance wirst du da keine unterschiede merken...
Doch, 1.5 Millisekunden! ![]() FBI-blitz |
||
Computer 1: AMD Athlon64 3500+ | nVidia GF 7900GT | 1024 MB DDR-RAM | ASUS A8N-SLI Preimium | 250 GB SATA 2 || WindowsXP | Blitz3D | Blitz+
Computer 2: AMD AthlonXP 2400+ | ATI Radeon 9500 | 512 MB DDR-RAM | MSI K7N2 | 80 GB IDE | 160 GB IDE || WindowsXP | Blitz3D | Blitz+ Computer 3: Intel Pentium MMX | onBoard-Grafik | 32 MB RAM | 1 GB IDE || Windows 98 SE | Blitz+ |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group