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
2 registered members (TipmyPip, 1 invisible), 18,789 guests, and 8 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
how to extract skill value of an entity from another entity #204150
04/27/08 09:01
04/27/08 09:01
Joined: Apr 2008
Posts: 28
India,Kolkata
A
ayan Offline OP
Newbie
ayan  Offline OP
Newbie
A

Joined: Apr 2008
Posts: 28
India,Kolkata
ok i have an action set to two entities....and I want to know the skill1 value of the first enity from the second entity....

 Code:
 
 action door
{
  my.skill1 = 0; // 0 = open, 1 = close
  ....
}


now i set this action to two doors door1 and door2....now if door1.skill = 1 then only i can set door2.skill2 = 0;
i.e., if only door 1 is close then only i can open door 2...i.e i must somehow know if door1 is closed or not

how can i do that...

Re: how to extract skill value of an entity from another entity [Re: ayan] #204155
04/27/08 09:22
04/27/08 09:22
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
i dont really remember how its done in c-script but define an entity pointer array or use ent_for_name(or something like that).

ENTITY* doors[2];

and in the action use

doors[my.skill2] = me;

use difrent numbers for each door as skill2, and you may use the skill 3 to the target door(that needs to be closed if other one is opnened). like

if(doors[my.skill3].skill1 == 0) //iff the other door is opened(skill3 must have the other entite's skill2 value)

sorry for messing it up.


3333333333
Re: how to extract skill value of an entity from another entity [Re: ayan] #204156
04/27/08 09:23
04/27/08 09:23
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
if you know you've only two doors i'd go with a global variable. otherwise i'd choose some kind of group array.

Re: how to extract skill value of an entity from another entity [Re: Joey] #204157
04/27/08 09:32
04/27/08 09:32
Joined: Apr 2008
Posts: 28
India,Kolkata
A
ayan Offline OP
Newbie
ayan  Offline OP
Newbie
A

Joined: Apr 2008
Posts: 28
India,Kolkata
ok i got your (both of you) point...thnx a lot... again(Quadraxas)


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