Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Trading Journey
by 7th_zorro. 04/27/24 04:42
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 770 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Animate Gun When Shooting #103842
12/24/06 08:18
12/24/06 08:18
Joined: Jun 2005
Posts: 734
Under your couch
Silent_Assassin Offline OP
Developer
Silent_Assassin  Offline OP
Developer

Joined: Jun 2005
Posts: 734
Under your couch
Hey,

just something simple and im sure im missing something... i want my gun to play an animation on left click (when shooting)...when i get a script that doesnt get any errors the animation doesnt work..otherwise i just get the error script error last line or something..anyone know how i can go about this ?

Nick

Last edited by Silent_Assassin; 12/24/06 08:34.

Visit us at www.m-tec-development.com WIP - Urban Conflict
Re: Animate Gun When Shooting [Re: Silent_Assassin] #103843
12/25/06 03:13
12/25/06 03:13
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
use med to animate the modle, then make a script for your game either at the end of the function main, or, inside of the player script...

code:
________________________________________________________________________________

while(mouse_left == 1){wait(1);

ent_cycle("frame", my.skill50);
my.skill50 += 5 * time;
my.skill50 %= 100;

}

________________________________________________________________________________

frame is the name fo the frame your animating.

have fun, and good luck.

Link.


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Animate Gun When Shooting [Re: DLively] #103844
12/25/06 04:15
12/25/06 04:15
Joined: Jun 2005
Posts: 734
Under your couch
Silent_Assassin Offline OP
Developer
Silent_Assassin  Offline OP
Developer

Joined: Jun 2005
Posts: 734
Under your couch
hmm that bit of code only gives me errors ^^

here is my code

Quote:


entity coltdelta_view
{
type = <coltdelta.mdl>;
layer = 2; // display above view entities with layer 1
flags = visible;// visible on screen from the start
view = CAMERA; // same camera parameters as the default view
x = 120; // place 100 quants ahead of the view
y = -50; // 30 to the left
z = -100; // and center vertically

while(mouse_left == 1){wait(1);

ent_cycle("firing5", my.skill50);
my.skill50 += 5 * time;
my.skill50 %= 100;
}
}







Visit us at www.m-tec-development.com WIP - Urban Conflict

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