Page 1 of 1

kill him!

PostPosted: Sun Feb 22, 2004 5:53 am
by hobgoblin
i want to make my first violent game!

i have a smile with a gun, and i want to make him kill another smile
how can i make then smile shoting the other one
and is possible make the smile shot in diferent directions?

answer

PostPosted: Sun Feb 22, 2004 11:33 am
by ingsan
create actor one (call him smile1)

create second actor (call him smile2)

Place smile1 and smile2 right in front of each other for the sake of this tutorial.

create third actor (call him shoot) and add Animation (yourShoot)

On smile1 :
add Event KeyDown, press c (or any other key u want to attribuate to shoot)
add Action Create Actor yourShoot.

On yourShoot :
add Event Create Actor
add Action Script Editor and write :

Code: Select all
diretional_velocity=5;



add as immediate action
Close

//when u press on "c-key",yourShoot will be created,and it will move right, towards smile2. :P
We then have to kill smile2 ! :twisted:

On smile2 :
add Event Collision with Actor yourShoot, with repeat NO
add Action Destroy Actor "Event Actor" // that is himself.

And that's it ! :wink:

PostPosted: Sun Feb 22, 2004 2:09 pm
by hobgoblin
ty guy

PostPosted: Sun Feb 22, 2004 8:35 pm
by hobgoblin

Re: answer

PostPosted: Sun Feb 22, 2004 10:23 pm
by hobgoblin
"the diretional_velocity = x ;" is making the bullet fly right to left

how can i make it fly in other direction(uo or down, or left to right)

PostPosted: Mon Feb 23, 2004 9:55 am
by ingsan
try this
For shoot to go up

Code: Select all
yvelocity=-5;


For shoot to go down

Code: Select all
yvelocity=5;


For right

Code: Select all
xvelocity=5;


For Left

Code: Select all
xvelocity=-5;

PostPosted: Tue Feb 24, 2004 1:39 am
by hobgoblin
where do you guys get those codes?

and another one...
how can i slow down the actors re-fire?

PostPosted: Tue Feb 24, 2004 8:32 pm
by ingsan
i don't understand :?:
and ps ...i'm not really a guy, actually :wink:

PostPosted: Tue Feb 24, 2004 9:04 pm
by hobgoblin
ingsan wrote:i don't understand :?:
and ps ...i'm not really a guy, actually :wink:


sorry :oops: i didn't read your location...

my question is

my actor has a pistol
but when shot, the re-fire is fast
so it doesn't look like he has a pistol

how can i make the re-fire slower?
(the speed that the Good guy creates the actor Shot)

PostPosted: Wed Feb 25, 2004 1:45 am
by Just4Fun
where do you guys get those codes?

Most of the code comes from the demos and the tutorial files that Makslane provides with GE. There is one folder that is titled "scripts". It provides examples of pure script for a few things like scoring, ect.
Obviously the forums also provide a wealth of information. Some of which you are now providing. :wink:

PostPosted: Wed Feb 25, 2004 10:01 pm
by hobgoblin
Just4Fun wrote:where do you guys get those codes?

Most of the code comes from the demos and the tutorial files that Makslane provides with GE. There is one folder that is titled "scripts". It provides examples of pure script for a few things like scoring, ect.
Obviously the forums also provide a wealth of information. Some of which you are now providing. :wink:


i was doing that...
but i thought that you guys took from other program

anyway...is pretty hard load, take note without ctrl+v and ctlr+c

PostPosted: Thu Feb 26, 2004 12:05 am
by makslane
hobgoblin wrote:my actor has a pistol
but when shot, the re-fire is fast
so it doesn't look like he has a pistol

how can i make the re-fire slower?



You have been used the "repeat" feature in Key Down event.
If you disable the repeat, you will get one shot per click.

But, you can try this:

1) On Key Down (without repeat):
Create a timer with a good interval

2) On timer:
Create your shot actor

3) On Key Up:
Destroy your timer

PostPosted: Thu Feb 26, 2004 2:10 am
by hobgoblin
makslane wrote:
hobgoblin wrote:my actor has a pistol
but when shot, the re-fire is fast
so it doesn't look like he has a pistol

how can i make the re-fire slower?



You have been used the "repeat" feature in Key Down event.
If you disable the repeat, you will get one shot per click.

But, you can try this:

1) On Key Down (without repeat):
Create a timer with a good interval

2) On timer:
Create your shot actor

3) On Key Up:
Destroy your timer


ty