kill him!

Non-platform specific questions.

kill him!

Postby hobgoblin » Sun Feb 22, 2004 5:53 am

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?
hobgoblin
 
Posts: 97
Joined: Sat Feb 21, 2004 5:10 pm
Location: BEHIND YOU!!!
Score: 0 Give a positive score

answer

Postby ingsan » Sun Feb 22, 2004 11:33 am

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:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby hobgoblin » Sun Feb 22, 2004 2:09 pm

ty guy
hobgoblin
 
Posts: 97
Joined: Sat Feb 21, 2004 5:10 pm
Location: BEHIND YOU!!!
Score: 0 Give a positive score

Postby hobgoblin » Sun Feb 22, 2004 8:35 pm

hobgoblin
 
Posts: 97
Joined: Sat Feb 21, 2004 5:10 pm
Location: BEHIND YOU!!!
Score: 0 Give a positive score

Re: answer

Postby hobgoblin » Sun Feb 22, 2004 10:23 pm

"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)
hobgoblin
 
Posts: 97
Joined: Sat Feb 21, 2004 5:10 pm
Location: BEHIND YOU!!!
Score: 0 Give a positive score

Postby ingsan » Mon Feb 23, 2004 9:55 am

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;
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby hobgoblin » Tue Feb 24, 2004 1:39 am

where do you guys get those codes?

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

i'm noob =P
__________
hobgoblin
 
Posts: 97
Joined: Sat Feb 21, 2004 5:10 pm
Location: BEHIND YOU!!!
Score: 0 Give a positive score

Postby ingsan » Tue Feb 24, 2004 8:32 pm

i don't understand :?:
and ps ...i'm not really a guy, actually :wink:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby hobgoblin » Tue Feb 24, 2004 9:04 pm

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)
__________

i'm noob =P
__________
hobgoblin
 
Posts: 97
Joined: Sat Feb 21, 2004 5:10 pm
Location: BEHIND YOU!!!
Score: 0 Give a positive score

Postby Just4Fun » Wed Feb 25, 2004 1:45 am

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've learned that I still have a lot to learn.

** Makslane == Genious **
Just4Fun
 
Posts: 524
Joined: Tue Jul 01, 2003 5:19 am
Location: USA: Washington State; West Coast
Score: 6 Give a positive score

Postby hobgoblin » Wed Feb 25, 2004 10:01 pm

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
__________

i'm noob =P
__________
hobgoblin
 
Posts: 97
Joined: Sat Feb 21, 2004 5:10 pm
Location: BEHIND YOU!!!
Score: 0 Give a positive score

Postby makslane » Thu Feb 26, 2004 12:05 am

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
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby hobgoblin » Thu Feb 26, 2004 2:10 am

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
__________

i'm noob =P
__________
hobgoblin
 
Posts: 97
Joined: Sat Feb 21, 2004 5:10 pm
Location: BEHIND YOU!!!
Score: 0 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron