7 registered members (EternallyCurious, 7th_zorro, Ayumi, Quad, AndrewAMD, ricky_k, 1 invisible),
497
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
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
OP
Junior Member
|
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
20BN
Member
|
Member
Joined: Feb 2003
Posts: 146
RP China
|
|
|
|
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
OP
Junior Member
|
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
User
|
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
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
OP
Junior Member
|
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
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
Remove the wait(1). What 20BN meant was the following (I've never tried it though, not sure how it behaves): 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: 20BN]
#471604
03/10/18 20:21
03/10/18 20:21
|
Joined: Feb 2005
Posts: 67 USA
June
OP
Junior Member
|
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: Dooley]
#472693
05/14/18 20:27
05/14/18 20:27
|
Joined: Aug 2003
Posts: 180 Reactor Core
NeutronBlue
Member
|
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..!
|
|
|
|