Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (Martin_HH, steyr, alibaba), 509 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
ent_create problem #224702
08/31/08 20:28
08/31/08 20:28
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
Hi,
well my first game in 3D GameStudio is coming alone fine.
Need a little help on this I am trying to put a missile at the same pos. as a ship.
code:
Code:

ent_create("missile1.mdl", vector(ship1 x,ship1 y,ship1 z),missile1);


syntext error.
I just don't know how to write it in lite-c
I hope someone can help.
Thank You
renny


I have A7 Commercial .............. Now I just need to learn how to use it

Re: ent_create problem [Re: sadsack] #224706
08/31/08 20:41
08/31/08 20:41
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
it should be...

Code:
ent_create("missile1.mdl", vector(ship1.x,ship1.y,ship1.z),missile1);

we use the "." operator to access the properties of an object/struct.



Last edited by DJBMASTER; 08/31/08 20:41.
Re: ent_create problem [Re: DJBMASTER] #224717
08/31/08 21:28
08/31/08 21:28
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
Hi,
what I am trying to do is when you press a key there is a missile created at the ship1 pos. this code should do that, but the missile never get load. I want to off set it so no coll. is taking place. new offset code:

Code:
action act_missile1()
{
	
	while(1)
	{
	if (key_b) {ent_create("missile1.mdl",vector(ship1.x ,ship1.y,ship1.offset_z=-100),missile1);}
	
		
		
		
	}
}





If I use this code above, the missile never loaded. but if I just load the missile like this it does load

Code:
in main

ent_create("missile1.mdl",vector(ship1.x ,ship1.y,ship1.z),missile1);}




But the offset code I got from the manual does not compile

Code:

ent_create("missile1.mdl",vector(ship1.x ,ship1.y,ship1.offset_z=-100),missile1);}




I hope you can understand what I am saying. I been working on this for three days now, I think it time a take a rest.
renny

Last edited by sadsack; 08/31/08 21:31.

I have A7 Commercial .............. Now I just need to learn how to use it

Re: ent_create problem [Re: sadsack] #224720
08/31/08 21:59
08/31/08 21:59
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
lol, scripters never rest!!!

If I were you, I'd not create an event which is looking for a button press, (btw it's missing a wait(1); ) but instead only put it when the button is pressed. This won't save you a huge amount of fps, but it will save some later if you're running plenty of functions.

Also this will stop missles being created every frame, if b is held. so....

Code:
action missile1(){
	//your action in here
	//prob c_move
}

function create_missile(){
	if(ship1){ //makes sure ship1 exists
		ent_create("missile1.mdl", vector(ship1.x, ship1.y, ship1.z-100), missile1);
	}
}

void main(){
	on_b = create_missile;
}


NB I've not used your ship1.offset_x=-100, this wasn't setting anything

Hope this helps laugh

Re: ent_create problem [Re: sadsack] #224721
08/31/08 22:05
08/31/08 22:05

C
cemetarycat
Unregistered
cemetarycat
Unregistered
C




LoL! sadsack

I'm still Waiting For Magic.
For my Ace of Base....rather than a lot of pain,difficulty, questions, frustration and headaches coding.

And it doesn't make it any easier cause I do like
3D Game Studio...and especially the Lite C scripting language. But alas!

and with that said, I hope you find a solution and answer to your ent_create question/problem.

cheers

Re: ent_create problem [Re: ] #224723
08/31/08 22:13
08/31/08 22:13
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
yes, I do have lot of pain,difficulty, questions, frustration, headaches and melt downs. Hey old cat, I hope you had a nice weekend. I was with lite-c all week end. she is one mean woman. but I think I am winning her over.
renny

EDIT: cat if you want, I have a chat room on my site, few of us cheap game makers hang out there some time. www.thegusworks.com If you want to stop by and say hi let me know and I will let you know when we are going be htere.
rdh

Last edited by sadsack; 08/31/08 22:23.

I have A7 Commercial .............. Now I just need to learn how to use it

Re: ent_create problem [Re: sadsack] #224758
09/01/08 03:32
09/01/08 03:32

C
cemetarycat
Unregistered
cemetarycat
Unregistered
C



haha, so true.
about the pain and difficulties.

But I met up with Ice Cube and he told me to go Torque or else he will kick my butt. wink

ahhhhhhhhh......



And Da Spokes Man for Torque Game Builder.


perhaps and sometime in the future...I will one day 'Command and Conquer' 3D Game Studio and Lite C.



cheers =)

Last edited by cemetarycat; 09/01/08 03:33.
Re: ent_create problem [Re: ] #224851
09/01/08 15:14
09/01/08 15:14
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
hey, cat sound good, if you want somenice free textures go here

http://www.thecodebrewers.com/Textures.html


will talk to you later, If you have time I will be at my chat room at 3 PM EST.
I think it is noon your time.

www.thegusworks.com


I have A7 Commercial .............. Now I just need to learn how to use it

Re: ent_create problem [Re: MrGuest] #224855
09/01/08 15:31
09/01/08 15:31
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
Thanks MrGuest I will try your code out this very afternoon.
renny


I have A7 Commercial .............. Now I just need to learn how to use it

Re: ent_create problem [Re: sadsack] #224898
09/01/08 20:48
09/01/08 20:48
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
Well MrGuest, I got your code to work at last, made one small change in it.

Thank You
renny


I have A7 Commercial .............. Now I just need to learn how to use it


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