Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
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
1 registered members (AndrewAMD), 645 guests, and 4 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
vec_for_vertex ... #375773
06/27/11 20:18
06/27/11 20:18
Joined: Aug 2010
Posts: 131
Iran
Mafia_IR Offline OP
Member
Mafia_IR  Offline OP
Member

Joined: Aug 2010
Posts: 131
Iran
Hi guys ,
i have two questions :

1) i created pics with ent_create command in lite-c and i wanted to created them in front of my gun , i used vec_for_vertex command here but i get a error message e1513 , Why ?

here is my code :

while(1)
{

...

if(key_ctrl)
{
vec_for_vertex(shoot_vector.x, my, 356);
ent_create("Shoot.jpg",shoot_vector,shoot_pic_function);
}
wait(1);
}


2)how can i create a sky for my space ship game ,because when i want to use Dome , ... they don't make a whole sky and they are only make sky in top but nothing in bottom .
and i dont want to use CUBE because it doesn't seem real ...

Thanks

Last edited by Mafia_IR; 06/28/11 03:43.
Re: vec_for_vertex ... [Re: Mafia_IR] #375835
06/28/11 10:19
06/28/11 10:19
Joined: Aug 2010
Posts: 131
Iran
Mafia_IR Offline OP
Member
Mafia_IR  Offline OP
Member

Joined: Aug 2010
Posts: 131
Iran
no one knows ? or is my English bad or what ?

Re: vec_for_vertex ... [Re: Mafia_IR] #375847
06/28/11 12:37
06/28/11 12:37

C
chris_oat
Unregistered
chris_oat
Unregistered
C



2) What doesnt look so real with CUBE? Define a skycube like in the Manual (search for it if you dont know it) and get a +6 skycube Texture (free resources) and it will look good.

Re: vec_for_vertex ... [Re: ] #375848
06/28/11 12:38
06/28/11 12:38
Joined: Aug 2010
Posts: 131
Iran
Mafia_IR Offline OP
Member
Mafia_IR  Offline OP
Member

Joined: Aug 2010
Posts: 131
Iran
it's not important right now , what about question one ?

Re: vec_for_vertex ... [Re: Mafia_IR] #375850
06/28/11 12:43
06/28/11 12:43

C
chris_oat
Unregistered
chris_oat
Unregistered
C



is there a Vector "shoot_vector" defined?

Is the "shoot_pic_function" in your ent_create ABOVE your code?

Re: vec_for_vertex ... [Re: ] #375856
06/28/11 13:42
06/28/11 13:42
Joined: Oct 2006
Posts: 873
S
Shadow969 Offline
User
Shadow969  Offline
User
S

Joined: Oct 2006
Posts: 873
it's better to post error message instead of error code alone.

there may be several reasons for crash:

-empty pointer('my' entity is not set or created at the moment).
-type mismatch(shoot_vector has to be either var array
Quote:
var shoot_vector[3];

or VECTOR structure
Quote:
VECTOR* shoot_vector;

in both cases when you want to pass a vector you don't have add .x after the variable's name unless it's an entity struct and you want to access it's coordinate.

so, if that doesn't help - post error message, and the code where you define shoot_vector

Re: vec_for_vertex ... [Re: Shadow969] #375989
06/29/11 08:01
06/29/11 08:01
Joined: Aug 2010
Posts: 131
Iran
Mafia_IR Offline OP
Member
Mafia_IR  Offline OP
Member

Joined: Aug 2010
Posts: 131
Iran
its my player function :

Code:
VECTOR* temp ;

function player_function ()
{
	player = me ;
	
	my.scale_x = 0.75 ;
	my.scale_y = 0.75 ;
	my.scale_z = 0.75 ;
	
	while(player_health >= 0)
	{
		c_move(me,vector(30*time_step,0,0),nullvector,IGNORE_PASSABLE);
		
		if(key_w)
...
	
		if(key_ctrl)
		{
			vec_for_vertex (temp.x, my, 356);
			ent_create("Shoot.jpg",temp,shoot_pic_function);
			ent_create("Shoot.jpg",temp,shoot_pic_function);
		}
		wait(1);
	}
}



do you know what's it mean ?

i have the same problem with fire in back and laser in front .
look at the first picture :


it's ok , because its pan never changed until now , in the next picture i changed its pan , now what's problem here ? fire pan and laser pan are changed, it shouldn't change , they should rotate with space ship .




what i want ? i want to shoot laser for enemy or stones in space and this(laser) should rotate with space ship .

it's my laser function :

Code:
function shoot_pic_function ()
{
	my.flags |= OVERLAY | BRIGHT | TRANSLUCENT | PASSABLE;
	
	my.alpha = 80 ;
	
	while(1)
	{
		c_move(me,vector(50,0,0),nullvector,IGNORE_PASSABLE);
		if((vec_dist(player.x, my.x)) >= 2000)
			break ;
			
		wait(1);
	}
	ent_remove(me);
}




Thanks ... laugh
Mohammad

Last edited by Mafia_IR; 06/29/11 08:03.
Re: vec_for_vertex ... [Re: Mafia_IR] #376177
06/30/11 15:21
06/30/11 15:21
Joined: Aug 2010
Posts: 131
Iran
Mafia_IR Offline OP
Member
Mafia_IR  Offline OP
Member

Joined: Aug 2010
Posts: 131
Iran
it was solved ! with my knowledge grin

EDIT : Do you know that which type of sky used in CSiS ?



Last edited by Mafia_IR; 06/30/11 15:25.

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