Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (EternallyCurious, AndrewAMD, TipmyPip, Quad), 889 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Waffe soll player folgen #346745
11/09/10 14:07
11/09/10 14:07
Joined: Jul 2010
Posts: 974
United Arab Emirates, Dubai
TheShooter Offline OP
User
TheShooter  Offline OP
User

Joined: Jul 2010
Posts: 974
United Arab Emirates, Dubai
Hi,
ich habe mir eine Axt von Acknex Unlimited runtergeldaen, sie in MED geöffnet, und in die richtige Position gebracht. So, wie bekomme ich das jetzt nun hin, ohne Templates, dass die Waffe dem Player folgt?? Ich benutze die Ego-Ansicht, wenn ihr den Playercode braucht, sagt bescheid.
mfG TheShooter :-)


Staub ist das neue Prime!!

Programming is like sex:
One mistake and you have to support it for the rest of your life.

Aktuelles Projekt: http://thisiswargame.bplaced.net/index.html

A8 Commercial *freu*
Re: Waffe soll player folgen [Re: TheShooter] #346746
11/09/10 14:15
11/09/10 14:15

C
chris_oat
Unregistered
chris_oat
Unregistered
C



keine ahnung wie viele möglichkeiten es da gibt, aber ich kenn nur die möglichkeit ein "View-Entity" zu definieren. Gibts es bestimmt genug im Forum darüber schon.
Ob es aber eine bessere, aktuellere Möglichkeit gibt, das weiss ich leider nicht.

Re: Waffe soll player folgen [Re: ] #346748
11/09/10 14:54
11/09/10 14:54
Joined: Jan 2010
Posts: 16
P
Potter_deluxe Offline
Newbie
Potter_deluxe  Offline
Newbie
P

Joined: Jan 2010
Posts: 16
vec_set(dein_entity.x,camera.x);
vec_to_angle(dein_entity.pan,camera.pan);
vec_set(dein_entity.pan,camera.pan);

Das schmeißt du in deine Waffenfunktion.
PS. Hab gehört AUM´s können weiterhelfen!

Re: Waffe soll player folgen [Re: Potter_deluxe] #346749
11/09/10 14:56
11/09/10 14:56
Joined: Jul 2010
Posts: 974
United Arab Emirates, Dubai
TheShooter Offline OP
User
TheShooter  Offline OP
User

Joined: Jul 2010
Posts: 974
United Arab Emirates, Dubai
soll ich das alles in eine action packen, und dann der Axt zuweisen? Oder wie?
Hab davon leider keine Ahnung. Könntest du mir mal ein Musterbeispiel schreiben?? also ich weiß nich was hinter x kommt und so tongue Hab auch grad mein handbuch verlegt...
wäre schön tongue

Last edited by TheShooter; 11/09/10 14:59.

Staub ist das neue Prime!!

Programming is like sex:
One mistake and you have to support it for the rest of your life.

Aktuelles Projekt: http://thisiswargame.bplaced.net/index.html

A8 Commercial *freu*
Re: Waffe soll player folgen [Re: TheShooter] #346753
11/09/10 15:14
11/09/10 15:14
Joined: Jan 2010
Posts: 16
P
Potter_deluxe Offline
Newbie
Potter_deluxe  Offline
Newbie
P

Joined: Jan 2010
Posts: 16
function place_axt()
{
proc_mode = PROC_LATE;
while(player != NULL)
{
vec_set(dein_entity.x,camera.x);
vec_to_angle(dein_entity.pan,camera.pan);
vec_set(dein_entity.pan,camera.pan);
wait(1);
}
}

action dein_player()
{
ent_create("dein.mdl",nullvector,place_axt);
// dein player code
}

Re: Waffe soll player folgen [Re: Potter_deluxe] #346754
11/09/10 15:15
11/09/10 15:15
Joined: Jan 2010
Posts: 16
P
Potter_deluxe Offline
Newbie
Potter_deluxe  Offline
Newbie
P

Joined: Jan 2010
Posts: 16
so sollte es funktionieren falls ich in der eile nichts vergessen hab^^

Re: Waffe soll player folgen [Re: Potter_deluxe] #346786
11/09/10 19:41
11/09/10 19:41
Joined: Jul 2010
Posts: 974
United Arab Emirates, Dubai
TheShooter Offline OP
User
TheShooter  Offline OP
User

Joined: Jul 2010
Posts: 974
United Arab Emirates, Dubai
Hi,
leider bekomme ich immer noch Errors. (Undeclared)
Das ist in meinem Playercode. (chopper.mdl ist meine Axt)
action player_walk()
{
ent_create("chopper.mdl",nullvector,place_axt);
my.health=100;
player = me;
my.eflags |= FAT | NARROW;
set(my, FLAG2);
my.emask |= ENABLE_IMPACT;
set(my,INVISIBLE);
while(my.health>0)
...........


Das ist in meiner Axt.c. Oder soll ich das in meine main schreiben?
function place_axt()
{
proc_mode = PROC_LATE;
while(player != NULL)
{
vec_set(chopper.mdl.x,camera.x);
vec_to_angle(chopper.mdl.pan,camera.pan);
vec_set(chopper.mdl.pan,camera.pan);
wait(1);
}
}

Hast du eine Ahnung??
mfG TheShooter :-)


Staub ist das neue Prime!!

Programming is like sex:
One mistake and you have to support it for the rest of your life.

Aktuelles Projekt: http://thisiswargame.bplaced.net/index.html

A8 Commercial *freu*
Re: Waffe soll player folgen [Re: TheShooter] #346840
11/10/10 07:13
11/10/10 07:13
Joined: Jan 2010
Posts: 16
P
Potter_deluxe Offline
Newbie
Potter_deluxe  Offline
Newbie
P

Joined: Jan 2010
Posts: 16
vec_set(chopper.mdl.x,camera.x); << steht das so in deinem Script?
Du musst da noch ein Entity definieren:
ENTITY* axt_ent;
vec_set(axt_ent.x,camera.x); ...usw.
function place_axt()
{
axt_ent = me;
//und der restliche code

Re: Waffe soll player folgen [Re: Potter_deluxe] #346849
11/10/10 09:39
11/10/10 09:39
Joined: Dec 2003
Posts: 988
Germany, Magdeburg
JoGa Offline
User
JoGa  Offline
User

Joined: Dec 2003
Posts: 988
Germany, Magdeburg
naja, er kann doch einfach auch den my-pointer der Axt nehmen, dann müsste er nicht extra nen Pointer definieren, oder?

while(player != NULL)
{
vec_set(my.x,camera.x);
vec_to_angle(my.pan,camera.pan);
vec_set(my.pan,camera.pan);
wait(1);
}

und bevor man das Axtentity in der Spieleraktion erschafft, müsste meines Wissens noch player = me davor, sonst fällt die Axt beim ersten mal der while(player != NULL)-Abfrage durch und macht nichts mehr.

Last edited by JoGa; 11/10/10 09:40.
Re: Waffe soll player folgen [Re: JoGa] #346859
11/10/10 12:54
11/10/10 12:54
Joined: Jul 2010
Posts: 974
United Arab Emirates, Dubai
TheShooter Offline OP
User
TheShooter  Offline OP
User

Joined: Jul 2010
Posts: 974
United Arab Emirates, Dubai
Hi,
also ich habe jetzt in meinem Axt.c Script folgenes:
ENTITY* axt_ent;
vec_set(axt_ent.x,camera.x);
function place_axt()
{
axt_ent = me;
proc_mode = PROC_LATE;
while(player != NULL)
{

vec_set(chopper.mdl.x,camera.x);
vec_to_angle(chopper.mdl.pan,camera.pan);
vec_set(chopper.mdl.pan,camera.pan);
wait(1);
}
}


ENTITY* axt_ent;
vec_set(axt_ent.x,camera.x);
function place_axt()
{
axt_ent = me;

So.....

Und in meinem playercode folgenes:
action player_walk()
{
ent_create("chopper.mdl",nullvector,place_axt);
my.health=100;
player = me;
my.eflags |= FAT | NARROW;
set(my, FLAG2);
my.emask |= ENABLE_IMPACT;
set(my,INVISIBLE);
while(my.health>0)
{
player_health=my.health;
handle_gravity(); // gravity
handle_movement(); // movement
my_speed = c_move(my,dist,absdist,IGNORE_PASSABLE|GLIDE);
handle_camera(); // camera function
wait(1);
}
player_health=0;
...........
Da ist nur das ent_create neu.
Leider bekomme ich jetzt folgenen Error: place_axt undeclared identifier.
Jemand eine Idee??


Staub ist das neue Prime!!

Programming is like sex:
One mistake and you have to support it for the rest of your life.

Aktuelles Projekt: http://thisiswargame.bplaced.net/index.html

A8 Commercial *freu*
Page 1 of 3 1 2 3

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