Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,791 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Bereits definierten POINTER Namen herrausfinden #143276
07/25/07 09:47
07/25/07 09:47
Joined: Feb 2006
Posts: 77
Schwäbisch Gmünd (nähe Stut...
M
maglat Offline OP
Junior Member
maglat  Offline OP
Junior Member
M

Joined: Feb 2006
Posts: 77
Schwäbisch Gmünd (nähe Stut...
Hallo miteinander,

in meinem Spiel ist es möglich mehrere Entitys zu erstellen die alle ihre eigene Zahl zugewiesen bekommen (Grün). Durch anklicken des Entitys (Blau) wird deren Skills / Eigenschaften in Variablen übergeben(orange) die dafür da sind, damit diese in einen Panel angezeigt werden. Nun ist mein Problem das ich nicht herausfinden kann, welche Zahl dem Entity gehört damit das Panel die Werte immer abändert. Bis jetzt kann ich das nur auf 1 Entity beziehen und nicht dynamisch (Rot)


var index = 0;
var my_entities[100]; // control up to 100 different entities
ENTITY* temp_ptr;


function show_skills()
{
if((event_type == EVENT_CLICK)>0)
{
show_skills2(HIER SOLL DIE NUMME REIN DES ENTITY DAS ICH ANGEkLICKT HABE, DAMIT DIESE AN DIE FUNKTION show_skills2 ÜBERGEBEN WERDEN KANN);
}
}

function show_skills2(number)
{
temp_ptr = ptr_for_handle(my_entities[number]);

v_show_skill_range = temp_ptr.SHOOTING_RANGE;
v_show_skill_damage = temp_ptr.SHOOTING_DAMAGE;
v_show_skill_inter = temp_ptr.SHOOTING_INTER;
v_show_skill_air = temp_ptr.SHOOTING_AIR;
v_show_skill_name = temp_ptr;

}


function cr_saaction()
{


my_entities[index] = handle (my);
index += 1;


my.SHOOTING_INTER = -0.15;
my.SHOOTING_RANGE = 100;
my.SHOOTING_DAMAGE = 1;
my.SHOOTING_AIR = 1;

my.emask |= (ENABLE_CLICK);
my.event = show_skills;

..weiterer Code..

}

Last edited by maglat; 07/25/07 10:17.

http://visit-ben.net
Com A7.82
current "big" Project : Undead Defender Adventure
Re: Bereits definierten POINTER Namen herrausfinde [Re: maglat] #143277
07/25/07 14:59
07/25/07 14:59
Joined: Jan 2007
Posts: 221
F
Fenriswolf Offline
Member
Fenriswolf  Offline
Member
F

Joined: Jan 2007
Posts: 221
Hi,

du kannst einfach den entsprechenden Index des Arrays in einem Entityskill speichern:

my_entities[index] = handle (my);
my.id = index;
index += 1;

Bei dem Funktionsaufruf übergibst du dann einfach diesen Entityskill:

show_skills2(my.id);

Re: Bereits definierten POINTER Namen herrausfinde [Re: Fenriswolf] #143278
07/25/07 19:57
07/25/07 19:57
Joined: Feb 2006
Posts: 77
Schwäbisch Gmünd (nähe Stut...
M
maglat Offline OP
Junior Member
maglat  Offline OP
Junior Member
M

Joined: Feb 2006
Posts: 77
Schwäbisch Gmünd (nähe Stut...
OH WIE IST DAS SCHÖN
OH WIE IST DAS SCHÖN
SOWAS HABE ICH LANG NICHT MEHR GESEHEN
GESEEEEEHEN
GESEEEEEEEEEEEEHN

Was ich damit sagen möchte. Vielen Dank!! Das war die Lösung meines Problems!
You are my man!!


http://visit-ben.net
Com A7.82
current "big" Project : Undead Defender Adventure

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1