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
0 registered members (), 1,103 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Just a clipboard for helping #122950
04/10/07 22:21
04/10/07 22:21
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline OP

Serious User
TWO  Offline OP

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
Post deleted by _^Bloodline^_

*HHAHAHA*

Re: TEMP::Thread [Re: TWO] #122951
04/10/07 22:26
04/10/07 22:26
Joined: Sep 2006
Posts: 128
Sweden
Tiinusen Offline
Member
Tiinusen  Offline
Member

Joined: Sep 2006
Posts: 128
Sweden
this is how i solved it

Code:
  
///////////////////////////////
#include <acknex.h>
#include <default.c>

///////////////////////////////



ENTITY* fool;

var speed = 1;

action none(){
ENTITY* hos = fool;
wait(1);
my->flags |= PASSABLE;
me.scale_x = 0.04;
me.scale_y = 0.04;
me.scale_z = 0.04;
c_updatehull(my, 1);
var tmp;
var temp;
while(true){


// GUN STATS
vec_for_vertex(tmp,hos,1453);
vec_set(me.x,tmp);
vec_for_vertex(temp,hos,my.skill1);
vec_set(tmp,temp);
vec_sub(tmp,me.x);
vec_to_angle(me.pan,tmp); // now MY looks at YOU
wait(1);
}
}

function enemy(){
my.scale_x = 0.4;
my.scale_y = 0.4;
my.scale_z = 0.4;
my.skill3 = 200;
my.skill4 = 2;
c_updatehull(my, 1);
while(true){
if()
wait(1);
}

}

function hit(){
if(event_type == EVENT_ENTITY){
error("test");
}

wait(1);

ent_remove(my);

}

action bullet(){

my.scale_x = 0.02;
my.scale_y = 0.02;
my.scale_z = 0.02;
c_updatehull(my, 1);

my.emask |= (ENABLE_SURFACE|ENABLE_IMPACT|ENABLE_ENTITY);
my.event = hit;

while(true){
c_move(my,vector(2*speed,0,0),nullvector,GLIDE);
wait(1);
}


}


action jag(){
var temp;
var cam;
var tmp;
my.scale_x = 0.3;
my.scale_y = 0.3;
my.scale_z = 0.3;

var zhead = 30;
var zbody = 30;
var kk;
var walking = 2300;
var attack;
var runner = 300;
var att = 0;
fool = my;
ENTITY* gun = ent_create("mac10.mdl",vector(0,0,0),none);
ENTITY* bl;



while(true){


vec_set(kk,me.x);
c_move(me, vector(0, (0-90), 0), nullvector, GLIDE);
camera.x = me.x;
camera.y = me.y;
camera.z = me.z + zbody + 100;
vec_set(me.x,kk);
vec_set(temp,me.x);
vec_sub(temp,camera.x);
vec_add(temp,vector(0,0,zhead));
vec_to_angle(camera.pan,temp); // now MY looks at YOU

if(key_y == true){
zhead+= 0.2;
}
if(key_h == true){
zhead-= 0.2;
}
if(key_j == true){
zbody+= 0.2;
}
if(key_g == true){
zbody-= 0.2;
}

if(key_a == true){
me.pan += time_step*3.2*speed ;
}
if(key_d == true){
me.pan -= time_step*3.2*speed ;
}

if(key_w == true){

if(key_shift == true){
c_move(me, vector(0, 15 * time_step *speed, 0), nullvector, GLIDE);
ent_animate(me,"walk2",walking,ANM_CYCLE);
walking += time_step * 12 *speed;
}else{
c_move(me, vector(0, 3 * time_step *speed, 0), nullvector, GLIDE);
ent_animate(me,"walk2",walking,ANM_CYCLE);
walking += time_step * 1.5 *speed;
gun.skill1 = 529;

}

}
if(key_s == true){
c_move(me, vector(0, (0-3) * time_step *speed, 0), nullvector, GLIDE);
ent_animate(me,"walk2",walking,ANM_CYCLE);
walking -= time_step * 1.5 *speed;
gun.skill1 = 529;
}


if(key_space == true && att >= 0){
attack = 0;
att = 0-180;
gun.skill1 = 529;




}
if(att < 0){
gun.skill1 = 529;
ent_animate(me,"shoot",attack,ANM_CYCLE);
attack += time_step * 16 *speed;

if(att == 0-180 || att == 0-90){
var last;
vec_for_vertex(last,gun,72);
bl = ent_create("bullet.mdl",vector(0,0,0),bullet);
vec_set(bl.x,last);
bl.pan = gun.pan - 180;
bl = NULL;
}

att += 2 *speed;
gun.skill1 = 529;

}



wait(1);
}

}



function main(){
level_load("sooc.wmb");
video_mode = 7;
wait(4);

ent_create("milita.mdl",vector(0,50,-60),jag);
ent_create("testgubbe.mdl",vector(0,250,-60),enemy);




}




Where is my manual? i think i lost it. i have been searching everywere. ohh there it is F1 I'm 17 years old, with 4 years of programing I can programming a lot of languages check my Bio out,

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