Hello, thanks for visiting GameML, if you are a Game Maker user, this is the site for you, please sign up, or login if you are already a member, or just browse the site! Welcome to GameML!

ATTENTION MEMBERS!!! USERS CAN NOW SIGN UP AGAIN!

Join the forum, it's quick and easy

Hello, thanks for visiting GameML, if you are a Game Maker user, this is the site for you, please sign up, or login if you are already a member, or just browse the site! Welcome to GameML!

ATTENTION MEMBERS!!! USERS CAN NOW SIGN UP AGAIN!
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Log in

I forgot my password

Search
 
 

Display results as :
 


Rechercher Advanced Search

Site Hits
Free hit counter
These stats started at 0 on July 7th 2009
GameML File Sharing
USERNAME: gamemladmin@gmail.com PASSWORD: gamemlsite Upload Here: https://gameml.forumotion.com/GameML-File-Sharing-h3.htmPlease add only games.
Create A GAMEML BLOG!
Make a Blog on GameML:http://gamemlblogs.wetpaint.com

Turret code

3 posters

Go down

Turret code Empty Turret code

Post by Dez1100 Wed Feb 10, 2010 3:24 am

A code for making a turret/shooting enemy.


Code:
//Turret fires if it can see the player

if collision_line(x,y,p1.x,p1.y,wall,1,0)//checks if their is a wall in the way
{x=x}//filler
else {if instance_exists(bullet)=false//check if there are bullets on the screen
{instance_create(x,y,bullet)}}//creates a bullet
Dez1100
Dez1100
GameML Basic
GameML Basic

Posts : 89
Points : 54438
GameML Reputation : 1
Join date : 2009-07-03
Age : 27
Location : Australia

http://bioforums.ownbb.com/

Back to top Go down

Turret code Empty Re: Turret code

Post by Sparx the Cy-Wolf Wed Feb 10, 2010 6:02 am

Um..you won't mind explaining the code would you?
Sparx the Cy-Wolf
Sparx the Cy-Wolf
Admin
Admin

Posts : 1775
Points : 56475
GameML Reputation : 5
Join date : 2009-06-07
Age : 33
Location : Mother ship

http://www.yoyogames.com/members/Sparx%20the%20Cy-wolf

Back to top Go down

Turret code Empty Re: Turret code

Post by themastersword Sun Mar 14, 2010 1:48 am

Need to put a "//" before "the way"!
themastersword
themastersword
GameML Noob
GameML Noob

Posts : 5
Points : 52453
GameML Reputation : 2
Join date : 2010-01-06
Age : 27
Location : Australia

http://blok-studios.com/

Back to top Go down

Turret code Empty Re: Turret code

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum