Turrets -- v1.4 RELEASED [Both Directions!]

Mods, guides how to use and install mods go right in here.
User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 12 Apr 2012, 03:08

Maurice wrote:
Turtle95 wrote:I could make a getX() and getY() in mario.lua .. no wait.. thinking java..
Thinking encapsulation.
Sadly, not with portals.

Making a method, mario:bullet()

lasery = math.atan2(self.y, self.x)

end

Gotta pass that to turret.lua now.

Maurice
Stabyourself.net
Posts: 2145
Joined: 01 Feb 2012, 20:19

Post » 12 Apr 2012, 03:11

Turtle95 wrote:Making a method, mario:bullet()

lasery = math.atan2(self.y, self.x)

end

Gotta pass that to turret.lua now.
Uh...

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 12 Apr 2012, 03:12

Maurice wrote:
Turtle95 wrote:Making a method, mario:bullet()

lasery = math.atan2(self.y, self.x)

end

Gotta pass that to turret.lua now.
Uh...
There's more to it, isn't there? I'm trying to read this on wikipedia, and it says it does (y, x) in calculation

User avatar
rokit
Posts: 2095
Joined: 03 Feb 2012, 00:47

Post » 12 Apr 2012, 03:21

atan2 returns a radian, not degree.
You can use math.sin and math.cos of the atan2 value to move it in the direction.

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 12 Apr 2012, 03:24

rokit boy wrote:atan2 returns a radian, not degree.
You can use math.sin and math.cos of the atan2 value to move it in the direction.
Ah.

So.. if Self.X (Mario) > turretx then
lasery = math.sin(turrety, self.y)
end

Hm.. Somehow I think that it might be wrong.. unless someone tells me otherwise..

User avatar
rokit
Posts: 2095
Joined: 03 Feb 2012, 00:47

Post » 12 Apr 2012, 03:28

lasery = lasery + (trigonometry shit here)

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 12 Apr 2012, 03:29

rokit boy wrote:lasery = lasery + (trigonometry shit here)
D:

Trig.. I'm in Algebra II.. Hope my brain doesn't explode.

What about.. Midpoint?

I could do that then double it by itself (not math.pow) to get the full range!
Last edited by Turtle95 on 12 Apr 2012, 03:30, edited 1 time in total.

User avatar
rokit
Posts: 2095
Joined: 03 Feb 2012, 00:47

Post » 12 Apr 2012, 03:30

I have not taken any studies... You should be fineeee.

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 12 Apr 2012, 03:31

rokit boy wrote:I have not taken any studies... You should be fineeee.
*imagines you looking at trig in 10 seconds, brain explodes everywhere*

NOOO! ROCKET BOY!

Oh well. Seriously though, read my last post

User avatar
Sky
Posts: 1283
Joined: 08 Mar 2012, 04:35
Contact:

Post » 12 Apr 2012, 03:35

Now you see why math is so important.

User avatar
rokit
Posts: 2095
Joined: 03 Feb 2012, 00:47

Post » 12 Apr 2012, 03:35

Well I took something from what I made:

Code: Select all

dx = speed*dt*math.cos(a)
dy = speed*dt*math.sin(a)

player.x = player.x + dx
player.y = player.y + dy

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 12 Apr 2012, 03:36

WillWare wrote:Now you see why math is so important.

Didn't say it wasn't. Since I only know up to Algebra II, I'll do as I said, do midpoint, and then double that (not math.pow)

EDIT:
Rokit, what's (a)? Don't want any errors if I used that.
Last edited by Turtle95 on 12 Apr 2012, 03:36, edited 1 time in total.

User avatar
rokit
Posts: 2095
Joined: 03 Feb 2012, 00:47

Post » 12 Apr 2012, 03:36

I know Trig quite well

User avatar
Sky
Posts: 1283
Joined: 08 Mar 2012, 04:35
Contact:

Post » 12 Apr 2012, 03:37

Turtle95 wrote:
I wrote:Now you see why math is so important.

Didn't say it wasn't. Since I only know up to Algebra II, I'll do as I said, do midpoint, and then double that (not math.pow)
I didn't say you said it wasn't. People just say that algebra has no real-life applications.
...
THIS TO ME IS REAL LIFE OKAY???

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 12 Apr 2012, 03:39

WillWare wrote:
Turtle95 wrote:
I wrote:Now you see why math is so important.

Didn't say it wasn't. Since I only know up to Algebra II, I'll do as I said, do midpoint, and then double that (not math.pow)
I didn't say you said it wasn't. People just say that algebra has no real-life applications.
...
THIS TO ME IS REAL LIFE OKAY???
OKAI BRO.

Anyway, I'll see how it goes. Wait.. How do I pass my lasery value back to the laser in turret.lua?

User avatar
rokit
Posts: 2095
Joined: 03 Feb 2012, 00:47

Post » 12 Apr 2012, 03:39

Turtle95 wrote:
WillWare wrote:Now you see why math is so important.

Didn't say it wasn't. Since I only know up to Algebra II, I'll do as I said, do midpoint, and then double that (not math.pow)

EDIT:
Rokit, what's (a)? Don't want any errors if I used that.
A is the angle in radians (the atan2 function)

Maurice
Stabyourself.net
Posts: 2145
Joined: 01 Feb 2012, 20:19

Post » 12 Apr 2012, 04:16

Image

Too lazy to do proper bullet graphic and the caution animation because this won't be in the game anyway.

User avatar
rokit
Posts: 2095
Joined: 03 Feb 2012, 00:47

Post » 12 Apr 2012, 04:16

Maurice wrote:Image
WHAT SORCERY IS THIS?

master both
Posts: 20
Joined: 03 Feb 2012, 04:16

Post » 12 Apr 2012, 04:28

Maurice wrote:Image

Too lazy to do proper bullet graphic and the caution animation because this won't be in the game anyway.
NOOOOOOOOOOOOO Why do you do this if its not gonna be in the game!

User avatar
12seth12
Posts: 139
Joined: 11 Mar 2012, 20:42

Post » 12 Apr 2012, 04:38

the point is for you to download his mod, and maybe help maurice if he ever wants to implement them.

User avatar
renhoek
Posts: 4545
Joined: 11 Feb 2012, 10:04

Post » 12 Apr 2012, 04:48

Maurice wrote:Too lazy to do proper bullet graphic and the caution animation because this won't be in the game anyway.
expect to see this in 1.7 or whatever
trust me he said it's more trouble than it's worth wich implies he was never going to implament slopes and look what happened

Maurice fool me once shame on you
fool me 8 or more times shame on me.

User avatar
HeroKing
Posts: 104
Joined: 10 Feb 2012, 23:57

Post » 12 Apr 2012, 12:13

master both wrote:
Maurice wrote:Image

Too lazy to do proper bullet graphic and the caution animation because this won't be in the game anyway.
NOOOOOOOOOOOOO Why do you do this if its not gonna be in the game!
count how many things maurice said was "not going to be in the game" yet they were. i am ofc referring to the screenshot marathon, and not post-release suggestions by the public that nobody bothered making

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 12 Apr 2012, 13:12

Maurice wrote:Image

Too lazy to do proper bullet graphic and the caution animation because this won't be in the game anyway.
If you're pretty much already done, then what's the point in not putting it into the game?

User avatar
trosh
Posts: 1594
Joined: 03 Feb 2012, 08:36

Post » 12 Apr 2012, 13:16

this looks way better than turtle's 1.4 version :P
anyway yeah would be great to add to the game (especially now you made it)
reminds me of those evil machine gun biatches in N (the way they shoot)
Soooo ... just needs bullet collision detection with mario ?
and if you change your mind I could always try do some simple bullet graphics

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 12 Apr 2012, 13:29

Honestly, for the bullets, they just need to be made black, as right now it looks more like the turret is projectile vomiting all over Mario.

Maurice
Stabyourself.net
Posts: 2145
Joined: 01 Feb 2012, 20:19

Post » 12 Apr 2012, 13:31

I hate puzzles that involve turrets, and putting turrets in Mari0 would make people use them in their puzzles.
http://dl.dropbox.com/u/17466990/turretstuff.zip

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 12 Apr 2012, 13:40

Why would you hate puzzles with turrets? Turrets are fun as long as no-one's making you run down their line of fire to pick them up and throw them away.

Maurice
Stabyourself.net
Posts: 2145
Joined: 01 Feb 2012, 20:19

Post » 12 Apr 2012, 13:45

Thanks you convinced me now turrets are totally fun and will be added

User avatar
NEoNoxD
Posts: 99
Joined: 07 Apr 2012, 23:37

Post » 12 Apr 2012, 13:46

you forgot *sarcasm* at the end :D

User avatar
renhoek
Posts: 4545
Joined: 11 Feb 2012, 10:04

Post » 12 Apr 2012, 13:48

Maurice wrote:I hate puzzles that involve turrets, and putting turrets in Mari0 would make people use them in their puzzles.
http://dl.dropbox.com/u/17466990/turretstuff.zip
so do you hate the turret puzzles in potal 1+2?
besides have you seen half the so called "Puzzles" in most of the mappacks?
= is a gap

---------------------
start button
------------------==

===----------------

---------------door

anyway you released a mod so I suppose that's good enough

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 12 Apr 2012, 13:51

Maurice wrote:Thanks you convinced me now turrets are totally fun and will be added
The question still stands. Are you actually still scared of turrets?

User avatar
NEoNoxD
Posts: 99
Joined: 07 Apr 2012, 23:37

Post » 12 Apr 2012, 13:51

maurice proved again, that he is awesome, he worked on a mod, which wont be in the game :D

and maybe he liked the idea, but he is too awesome to show this to others :3

Maurice
Stabyourself.net
Posts: 2145
Joined: 01 Feb 2012, 20:19

Post » 12 Apr 2012, 14:11

xXxrenhoekxXx wrote:
Maurice wrote:I hate puzzles that involve turrets, and putting turrets in Mari0 would make people use them in their puzzles.
http://dl.dropbox.com/u/17466990/turretstuff.zip
so do you hate the turret puzzles in potal 1+2?
Yes

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 12 Apr 2012, 14:26

Turrets were one of the best puzzle elements in Portal, they added some kind of direct threat, and meant that you needed to do something other than be smart to beat the chamber. Sure, the first time they come up they're pretty scary, but Portal needed something like that in it to stop it from being so passive. The only other thing that was even nearly like that was the energy ball and that was easy to avoid as you never actually needed to go near one without your faithful companion cube to shield you.

User avatar
renhoek
Posts: 4545
Joined: 11 Feb 2012, 10:04

Post » 12 Apr 2012, 14:26

you know now that I think about it turrets never really were a puzzle
they'd just make you move faster to survive (yeah real challenging)

besides it's not the same without the voices.

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 12 Apr 2012, 14:29

Voices can be added with ease.
And the turrets were a puzzle, just a different kind of puzzle. You had to work out where you were going to attack to successfully kill them all without dying. It was more of a tactics thing.

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 12 Apr 2012, 14:30

NEoNoxD wrote:maurice proved again, that he is awesome, he worked on a mod, which wont be in the game :D

and maybe he liked the idea, but he is too awesome to show this to others :3
I suppose I can clean the gfx up and add the code to my mod

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 12 Apr 2012, 14:32

Turtle95 wrote:I suppose I can clean the gfx up and add the code to my mod
No no no you're doing it all wrong. Maurice already made and released the mod, attempting to use your old code is simply a bad plan. Also, apart from the vomit bullets, those graphics are perfectly fine.

User avatar
NEoNoxD
Posts: 99
Joined: 07 Apr 2012, 23:37

Post » 12 Apr 2012, 14:34

Camewel wrote:
Turtle95 wrote:I suppose I can clean the gfx up and add the code to my mod
No no no you're doing it all wrong. Maurice already made and released the mod, attempting to use your old code is simply a bad plan. Also, apart from the vomit bullets, those graphics are perfectly fine.
I agree :D

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 12 Apr 2012, 14:41

NEoNoxD wrote:
Camewel wrote:
Turtle95 wrote:I suppose I can clean the gfx up and add the code to my mod
No no no you're doing it all wrong. Maurice already made and released the mod, attempting to use your old code is simply a bad plan. Also, apart from the vomit bullets, those graphics are perfectly fine.
I agree :D
I'm not adding any more code to it, only putting it in my mod to better how it looks. That's all.

User avatar
NEoNoxD
Posts: 99
Joined: 07 Apr 2012, 23:37

Post » 12 Apr 2012, 14:45

okay, but give credits to maurice :D

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 12 Apr 2012, 14:46

I don't see what you mean by 'putting it into your mod'. Maurice already made and released it. There is nothing there that pertains to you.

DjShadFox
Posts: 12
Joined: 06 Mar 2012, 20:33

Post » 12 Apr 2012, 14:48

I put .png from "turretsstuff.zip" to the graphics folder in the source, put all .lua files from the archive to the others .lua, launched game and... nothing. There weren't any turrets in game. what did i do wrong?

User avatar
NEoNoxD
Posts: 99
Joined: 07 Apr 2012, 23:37

Post » 12 Apr 2012, 14:51

did you checked in level editor?

Maurice
Stabyourself.net
Posts: 2145
Joined: 01 Feb 2012, 20:19

Post » 12 Apr 2012, 14:53

It's not the complete mod. It's missing some draw calls and the placeable entity.
I can't really upload the whole thing because of netplay.

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 12 Apr 2012, 14:56

Maurice wrote:It's not the complete mod. It's missing some draw calls and the placeable entity.
I can't really upload the whole thing because of netplay.
The only thing it's not doing is firing. Man.. Gotta do something then.

User avatar
NEoNoxD
Posts: 99
Joined: 07 Apr 2012, 23:37

Post » 12 Apr 2012, 14:58

lol maurice, yes you can upload :3 I'll hypnotize you. :D

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 12 Apr 2012, 15:00

I will give credits to Maurice. I promise. No joke.

Well, credit for the code. That one guy gets credit for the sprites.

Maurice
Stabyourself.net
Posts: 2145
Joined: 01 Feb 2012, 20:19

Post » 12 Apr 2012, 15:08

Turtle95 wrote:I'm not adding any more code to it, only putting it in my mod to better how it looks. That's all.
To "better how it looks"? Most of the code I uploaded is for finding a player, adjusting the aim and firing. Maybe you should learn some lua before you finish this.

User avatar
Turtle95
Posts: 1246
Joined: 21 Mar 2012, 21:48
Contact:

Post » 12 Apr 2012, 15:09

Maurice wrote:
Turtle95 wrote:I'm not adding any more code to it, only putting it in my mod to better how it looks. That's all.
To "better how it looks"? Most of the code I uploaded is for finding a player, adjusting the aim and firing. Maybe you should learn some lua before you finish this.
Graphics, Maurice. I did. It's not firing though.

Locked