Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (sleakz, AndrewAMD), 684 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Is it possible to create multiple entities with one line? #471563
03/10/18 04:46
03/10/18 04:46
Joined: Feb 2005
Posts: 67
USA
June Offline OP
Junior Member
June  Offline OP
Junior Member

Joined: Feb 2005
Posts: 67
USA
I'm working on a giblet effect for an exploding object and want to create multiple gibs when the object explodes.

Is it possible to create more than one entity with a line of code or does one need to use "ent_create" for each individual gib?


June
smooth-3d.com
Re: Is it possible to create multiple entities with one line? [Re: June] #471564
03/10/18 05:47
03/10/18 05:47
Joined: Feb 2003
Posts: 146
RP China
2
20BN Offline
Member
20BN  Offline
Member
2

Joined: Feb 2003
Posts: 146
RP China
you can create *.wmb

Re: Is it possible to create multiple entities with one line? [Re: 20BN] #471565
03/10/18 06:19
03/10/18 06:19
Joined: Feb 2005
Posts: 67
USA
June Offline OP
Junior Member
June  Offline OP
Junior Member

Joined: Feb 2005
Posts: 67
USA
I'm ot sure what you mean by that. Though I think I found a solution to create 20 gib models with less code than writing out ent_create 20 times:


.....

var gibness = 20;

while (gibness > 0)
{
ent_create ("gib1.mdl", my, move_gib);
gibness -= 1;
wait(1);
}

.....

This may be the most simple way.


June
smooth-3d.com
Re: Is it possible to create multiple entities with one line? [Re: June] #471566
03/10/18 07:29
03/10/18 07:29
Joined: Oct 2008
Posts: 681
Germany
Ayumi Offline
User
Ayumi  Offline
User

Joined: Oct 2008
Posts: 681
Germany
Sure, just use an Animation (or an effect). But it s just one Entity

Edit: You mean a loop grin

Last edited by Ayumi; 03/10/18 07:55.
Re: Is it possible to create multiple entities with one line? [Re: Ayumi] #471568
03/10/18 08:45
03/10/18 08:45
Joined: Feb 2005
Posts: 67
USA
June Offline OP
Junior Member
June  Offline OP
Junior Member

Joined: Feb 2005
Posts: 67
USA
Well the intention is to create 20 gibs as soon as the oil barrel explodes. I suppose I could use an effect but these gibs are going to be on fire and bounce around too, maybe leave some scorch marks all over the place.


June
smooth-3d.com
Re: Is it possible to create multiple entities with one line? [Re: June] #471573
03/10/18 10:53
03/10/18 10:53
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Remove the wait(1). confused

What 20BN meant was the following (I've never tried it though, not sure how it behaves):
Quote:
A8 ent_create can create several entities at once by loading a WMB entity that contains sub-entities.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Is it possible to create multiple entities with one line? [Re: Superku] #471585
03/10/18 16:10
03/10/18 16:10
Joined: Feb 2003
Posts: 146
RP China
2
20BN Offline
Member
20BN  Offline
Member
2

Joined: Feb 2003
Posts: 146
RP China
create a new level and put your model in VECTOR(you need xyz), save and build.

and in your main game level use ent_create("new_level.wmb",vector,NULL);

now use 1 script create many model( and you can set deferent action in every models)

Re: Is it possible to create multiple entities with one line? [Re: 20BN] #471604
03/10/18 20:21
03/10/18 20:21
Joined: Feb 2005
Posts: 67
USA
June Offline OP
Junior Member
June  Offline OP
Junior Member

Joined: Feb 2005
Posts: 67
USA
That is an interesting feature, I will check it out when I upgrade to A8. Thank you guys for your guidance.


June
smooth-3d.com
Re: Is it possible to create multiple entities with one line? [Re: June] #472339
04/21/18 23:51
04/21/18 23:51
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 868
Chicago, IL
while (gibness > 0){ent_create ("gib1.mdl", my, move_gib);gibness -= 1;wait(1);}

You're Welcome laugh

Re: Is it possible to create multiple entities with one line? [Re: Dooley] #472693
05/14/18 20:27
05/14/18 20:27
Joined: Aug 2003
Posts: 180
Reactor Core
NeutronBlue Offline
Member
NeutronBlue  Offline
Member

Joined: Aug 2003
Posts: 180
Reactor Core
I think (not 100%) that using a WMB the way described here, is the same as using a "prefab".
In which case, you're very limited with what can be done to it after creation.

I'm *not* calling you a dummy - but "Entities vs. Prefabs" and the "Entity Selection Guide" parts of the manual might help your decision..

Best regards,

~Neut.


Dreaming ain't Doing..!
<sigh> Darn semicolons - I always manage to miss at least 1..!

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