Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, AndrewAMD, Ayumi), 750 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Action on group entity #176835
01/07/08 04:08
01/07/08 04:08
Joined: Oct 2007
Posts: 85
H
harry3174 Offline OP
Junior Member
harry3174  Offline OP
Junior Member
H

Joined: Oct 2007
Posts: 85
Hi,

I have taken four sphere as entity.I want to
group them and give action on group, as mouse move they rotate.Also want to
give action on each sphere entity.
Is it possible ? How ?

Please help

Re: Action on group entity [Re: harry3174] #176836
01/07/08 06:19
01/07/08 06:19
Joined: Jul 2005
Posts: 34
Hong Kong
U
ultranet Offline
Newbie
ultranet  Offline
Newbie
U

Joined: Jul 2005
Posts: 34
Hong Kong
I think you could assign the four spheres to the same ENTITY pointer.
e.g.
ENTITY* sphereGroup;

action sphereAction()
{
me=sphereGroup;
.....
}

Then when you use sphereGroup, it refers to the four spheres.

Re: Action on group entity [Re: ultranet] #176837
01/10/08 09:20
01/10/08 09:20
Joined: Oct 2007
Posts: 85
H
harry3174 Offline OP
Junior Member
harry3174  Offline OP
Junior Member
H

Joined: Oct 2007
Posts: 85
Hi,
I have take 4 earth.mdl.Group them and rename "spg".
In wed i take my mouse_move.wdl from map properties.
In which Ihave move_me_by_mouse action.
when i chose spg group and go to its properties,
behaviour option doesnt come.
How can i assign action from choose action on spg group ?

Please help.

Re: Action on group entity [Re: harry3174] #176838
01/12/08 17:54
01/12/08 17:54
Joined: Dec 2006
Posts: 78
Nevada, USA
Futurulus Offline
Junior Member
Futurulus  Offline
Junior Member

Joined: Dec 2006
Posts: 78
Nevada, USA
I would probably make an invisible entity in between them, assign that the mouse move action, then make the spheres' action just a loop that keeps them into the same place relative to the mouse_move entity.
Code:
// !untested!
var invisible_ent;

// assign this to another entity -- doesn't matter what, you won't see it
action move_me_by_mouse
{
my.invisible = on;
my.passable = on;
invisible_ent = me;

// your mouse move code
}

action sphere
{
while(invisible_ent == NULL)
{ wait(1); }
you = invisible_ent;

vec_set(my.skill50, my.x);
vec_sub(my.skill50, your.x);
while(1)
{
vec_set(my.x, your.x);
vec_add(my.x, my.skill50);
wait(1);
}
}

EDIT: I don't think you can assign an action to a group in WED, only individual entities.

Last edited by Futurulus; 01/12/08 17:57.
Re: Action on group entity [Re: Futurulus] #176839
01/18/08 00:34
01/18/08 00:34
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

If you assign to each entity in WED the same action...you get 4 entities that
do the same thing at the same time. (a group)

If you want to give one of them a "bigger Spin" assign a number to a skill
In your script you can find this entity with "handle".

Hope this helps
Ottawa


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

Gamestudio download | chip programmers | 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