Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Help timing/executing actions.

ryandavanzo
Registered User
Quote
2022-09-28 01:32:14

Ok, I'm new to Coppercube, but I already managed to import an animated gun into the engine. BUT, it's a shotgun, so it has a shooting animation and a pumping animation, so basically separated actions (also audios). However, I don't know how to execute them correctly. Basically the animations and sounds play one over another. I thought that the script woul'd read the actions on loading order...but it reads them all at once.

Sorry for bad english and explanation. I'm brazilian ;w;


sven
Registered User
Quote
2022-09-28 17:38:12

You need to call next animation if first is ended not at once with two actions.

You can use dolater action and variable for this.

Variable shoot=0

If mouse pressed and shoot=0 then
Play shoot anim
Play shoot audio
Set shoot=1
DoLater animationTime set shoot=0
Endif

With this logic you should be able to shoot gun with one shoot audio and animation played to the end.

If that works you can add more logics for pump anim and audio..also for idle anim.


ryandavanzo
Registered User
Quote
2022-09-28 18:28:25

Ok, but...I don't know how to script yet ;w;
I'm using the built-in scripts and stuff


sven
Registered User
Quote
2022-09-28 21:40:05

no scripting needed for this..

you can do it all with built in actions.


ryandavanzo
Registered User
Quote
2022-10-02 01:13:29

Tried that since day 29, the day I readed this. No go. Idk what i'm doing wrong. I just...suck at this


ryandavanzo
Registered User
Quote
2022-10-02 01:25:03

Really, isn't there any tutorials that explain this? I've found NONE of them. I'm starting to give up AGAIN on making my own game.


Robo
Guest
Quote
2022-10-02 04:12:18

Sounds like you have one combined animation from separate ones - which loads by default in CopperCube.

Under Properties, open 'Animation' and select <Edit> and then create the separate animations based on known frames or just work it out from the image.

Save the animation name and then you can call that animation when you need it.


sven
Registered User
Quote
2022-10-02 10:46:24

heres simple example i made.
Press R to reload and mouse left to shoot.
https://drive.google.com/file/d/...

You see how i use shoot and "reload" and idle animations here.

You see default pistol has separated animations already.. it has IDLE / SHOT / LOWER ARM as "reload"
(if you dont have separated animations then you need to edit them as Robo sayd)

You see variable SHOOT that will control animations so you cant play them over each other.

Do later action will be used to reset animation do IDLE when reload or shoot animation is done.


ryandavanzo
Registered User
Quote
2022-10-02 19:07:12

Huh...I can't find the "do something later" action on my project tho. Is it a downloadeble script? Cause that's exactly what I need ;w;


ryandavanzo
Registered User
Quote
2022-10-02 19:28:12

Ok, I had to reinstall it for the option to show up...and my GOD THANK YOU <3 <3 <3


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internationa?" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact