2 registered members (NnamueN, 1 invisible),
1,413
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
functions you need
#254190
03/01/09 17:07
03/01/09 17:07
|
Joined: Feb 2006
Posts: 385 Oldenburg,Germany
Ralph
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
|
Im working on a little functions reference, wich I want to give for free if its finished. So I need some function ideas from you, because im not so creative. Post your function ideas here and I will implement it to the reference. This is what I have yet: - call a function from a string/char ("name here",array with args you want to deliver to the function,num of args) - put every type of variables in a array (array,var/int/long/char...,index) I hope someone can give me ideas. Sorry for my bad english. Greetings Ralph.
|
|
|
Re: functions you need
[Re: Ralph]
#254219
03/01/09 19:27
03/01/09 19:27
|
Joined: Jan 2008
Posts: 1,580
Blade280891
Serious User
|
Serious User
Joined: Jan 2008
Posts: 1,580
|
bit big but what about some like movement function(s), then maybe some based for certain games like a shooting function, menu function etc.
My Avatar Randomness V2"Someone get me to the doctor, and someone call the nurse And someone buy me roses, and someone burned the church"
|
|
|
Re: functions you need
[Re: Ralph]
#254245
03/01/09 22:48
03/01/09 22:48
|
Joined: Feb 2006
Posts: 385 Oldenburg,Germany
Ralph
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
|
bit big but what about some like movement function(s), then maybe some based for certain games like a shooting function, menu function etc. I want to make a reference of some helping functions,not a hole framework... ( although Im creating a 2D framework but this is only for me,so far) I add 2 new functions to the reference. - str_split (split a string by a char or after a number of chars and put it into a TEXT object) - str_merge (merge all strings from a TEXT object into one string, you can add a char after each part like ",") I think I can upload the reference in a 2-3 days and update it later when I have new functions. Greetings Ralph
Last edited by Ralph; 03/01/09 22:48.
|
|
|
Re: functions you need
[Re: Ralph]
#254256
03/02/09 01:55
03/02/09 01:55
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
something like
/*************************************************
makes me look at you
*************************************************/
function look_at(ENTITY* ent_me, ENTITY* ent_you){
var temp[3];
vec_set(temp, ent_you.x);
vec_sub(temp, ent_me.x);
vec_to_angle(ent_me.pan, temp);
}
/*************************************************
makes me look at position
*************************************************/
function look_to(ENTITY* ent_me, VECTOR* vec){
var temp[3];
vec_set(temp, vec);
vec_sub(temp, ent_me.x);
vec_to_angle(ent_me.pan, temp);
} ?
|
|
|
Re: functions you need
[Re: MrGuest]
#254266
03/02/09 07:19
03/02/09 07:19
|
Joined: Feb 2006
Posts: 385 Oldenburg,Germany
Ralph
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
|
something like
/*************************************************
makes me look at you
*************************************************/
function look_at(ENTITY* ent_me, ENTITY* ent_you){
var temp[3];
vec_set(temp, ent_you.x);
vec_sub(temp, ent_me.x);
vec_to_angle(ent_me.pan, temp);
}
/*************************************************
makes me look at position
*************************************************/
function look_to(ENTITY* ent_me, VECTOR* vec){
var temp[3];
vec_set(temp, vec);
vec_sub(temp, ent_me.x);
vec_to_angle(ent_me.pan, temp);
} ? Thats nice! I put it into the reference. I added 2 new Functions too. - str_cat_b this add the secound string on the beginning of the first string - str_cat_num_b same like str_cat_b with a var
|
|
|
|