Gamestudio Links
Zorro Links
Newest Posts
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 (AndrewAMD, 7th_zorro, dr_panther), 1,297 guests, and 6 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
Objects spawning ? #426777
07/29/13 13:34
07/29/13 13:34
Joined: Jul 2012
Posts: 45
G
Gino_Fabrizio Offline OP
Newbie
Gino_Fabrizio  Offline OP
Newbie
G

Joined: Jul 2012
Posts: 45
Hi there, its me again tongue
In the proccess of making my FPS game of zombies, I have a trouble , a big one frown
I make the map using "small.hmp", and then I spawn manually tree models on the sides for the player dont leave the map, and I also load the level endless to make it better.
Then I spawn trees and grassess for the map using "ent_terrain_place", to spawn it randomly. The idea is to make a "cementery", Im using all dark possible. The problem is that I make the player to search a pistol to use, but when I spawn the pistol with "ent_terrain_place", it get bad... sometimes it spawn inside a tree, or in a tree of the side that is blocking the player to leave the cementery, so he cant pick up the pistol frown for pick up, I make an action that checks the player dist to be <= 70 and he have to press the "E" key to pick up. So I want to know a way to spawn the pistol far from trees, if there is any way, thanks you laugh

Re: Objects spawning ? [Re: Gino_Fabrizio] #426778
07/29/13 13:42
07/29/13 13:42
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
Use a seed map. To avoid spawning trees in the gun, use another color where u want to put the gun. I would trace to look if the position is free for the gun ( or a c_scan ). Also i would use ent_create for the gun.

greets

Last edited by rayp; 07/29/13 13:42.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: Objects spawning ? [Re: rayp] #426783
07/29/13 13:54
07/29/13 13:54
Joined: Jul 2012
Posts: 45
G
Gino_Fabrizio Offline OP
Newbie
Gino_Fabrizio  Offline OP
Newbie
G

Joined: Jul 2012
Posts: 45
Thanks for replying laugh

What do you mean with "seed map"?

Re: Objects spawning ? [Re: Gino_Fabrizio] #426787
07/29/13 14:37
07/29/13 14:37
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
http://www.conitec.net/manual_d/level_c.htm
Quote:
ent_seed (char* name, ENTITY* terrain, BMAP* mask, COLOR* color, var dist, var mode, EVENT act): var


greets

Last edited by rayp; 07/29/13 14:38.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: Objects spawning ? [Re: rayp] #426789
07/29/13 14:46
07/29/13 14:46
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
well simply do a c_trace from the gun to the ground and see if you hit a tree or the map, in my eyes much more simple laugh

Re: Objects spawning ? [Re: Ch40zzC0d3r] #426791
07/29/13 14:56
07/29/13 14:56
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
As i said above.
Quote:
I would trace to look if the position is free for the gun ( or a c_scan ). Also i would use ent_create for the gun.
But placing vegetation without seed map CANT be good btw.

Last edited by rayp; 07/29/13 14:57.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: Objects spawning ? [Re: Gino_Fabrizio] #427034
08/01/13 12:05
08/01/13 12:05
Joined: Jun 2013
Posts: 108
Alberta, Canada
C
CanadianDavid Offline
Member
CanadianDavid  Offline
Member
C

Joined: Jun 2013
Posts: 108
Alberta, Canada
As mentioned above, see:
c_scan
c_trace

And also maybe:
vec_dist

Another possibility is to randomly spawn the pistol at the same time one of trees is spawned at a position beside the tree. Use a global variable to store whether or not the pistol has been spawned yet or not so that you do not spawn more pistols.


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