SWAP out on Indievania and Desura!

I will go tell my friends portal 3 is out, this is looking nice and stylised, keep it up :slight_smile:

oh ok thanks ill check it out

and no im only using one light for the whole scene but im thinking about using one for the lazer beam so that it emits light.

haha thanks Allan

For Lazer beams, look into bge.render.drawLine

it can draw a line 1 pixel wide, with a colour of your choice.
Example:


import bge
import mathutils

colour = [1, 0, 0]
position_1 = mathutils.Vector([0, 0, 0])
position_2 = mathutils.Vector([2, 0, 0])

bge.render.drawLine(position_1, position_2, colour)

cool! does it like emit light or glow but still ill use it. thanks!

EDIT: ok i got it to work but how do i get it to be where the lazer emitter is cause its off in a randome spot i tried changing the values in the script but its not moving to where i want it to.

Ok, well that example only draws a line from point a to point b.
To make it draw to a new location, you need a to and from point.
So, you could use two objects, or empties.
In that case,


scene = bge.logic.getCurrentScene()

position_1 = scene.objects['Empty'].worldPosition
position_2 = scene.objects['Empty.001'].worldPosition

would replace the position variables, and you’d have two empties called ‘Empty’, ‘Empty.001’

ok so i made it so the lazer emitter mesh that i called lazer_emitter i made has a allways attached to the python script and and a empty witch i called lazer_end and in the script i changed the names ocordingly and double check spelling and stuff but it still doesnt work?

also i have a problem with objects that emmit things like say if i have one tile that shoots out balls and it works fine but if i swap it to another place it shoots the balls out like way over somewhere else.

As so often: What does the Console say?
(You really must watch that first and if you don’t understand what the Console says, then give its Information – but if you have a Code given that would work and it doesn’t, anyone else guess only guess wildly, and most-probably wild Guesses would be a Waste of Time.)

And concernin’ your shot Balls, People must see your Script, your Method, your Technique, because on that Point we would have to guess even wilder/wildlier. :wink:

ok sorry ill post a blend later today

Ok sry for not getting up here yesterday but here it is
so basically you see the red claw shaped thing with a lazer coming out of it well sorta lazerish thing well if you click on the red claw and then click on another square to swap it the lazer does stay alighened how it should

EDIT: this only happens if you swap it from the wall to the floor or to a different orientation

http://www.mediafire.com/?m9qcxj15mbvsnjj

ok so even using mozilla the forum upload wont work so here is a link to a diffrent hosting site hopefully it works.

Downloaded it.

Well, first, the Direction of the shot Ball is incorrect because the Force when being added must be set as local, via the [L] Button next to the Force, and instead of the X Value you must set the Z Value. This Way, the Ball will always be shot towards it’s Parent’s local Z-Axis.

However, the Laser gets dispositioned pretty oddly as soon as the Laser-Ballshoot-Parentobject-Thingy is swapped to the Ground. I would yet have to figure out why that is.

The worst, however, seems to me, that for Reasons that I myself could not explain, the Object won’t be able to be swapped onto the Wall once it has got swapped to the Ground.

(By the Way, I think that kachel02DOT3.png was not packed.)

ya i tryed using the local but and changing the axis it still doesnt work so i just left it where i last had it also sry i allways forget to pack the textures but atleast you still have the main part of it.

so there is no fix for this?

For the Wall-Floor-Swap Issue? I have no Explanation for it. Might have its Root in the Script or Module that you use. Haven’t you once mentioned it was something from Monster? If so, then he might know.

no its nothing todo with monster’s script because on the old way of doing the game how i had beveled squares, it worked just fine but now with the new setup it wont work.

So just basic tiles that are flat will swap just fine and keep the correct orientation the lazer emitter tile that hase claws sticking out of it is suposed to shoot out a cylinder for a lazer and it works fine when you first start the game but if you swap the lazer emitter to another tile of a diffrent rotation say from the wall to the floor the lazer keeps shooting out but at a odd location like over to the left of the tile instead right in the center where it should be. does anybody know why this is happening?

does anybody know how to solve this?

i posted a big update on the top of the first thread page.

Tested it.
I like how you make use of mostly just one Normalmap-Texture – it was a enjoyable when I recognized that the Grid on the Door was just the same Texture, because in the first place it really didn’t look like it.
The Puzzle is just right for the first one in the Game.

However, you might consider using the [E]-Key for Interacting (like Switch-switching in this Case), because it is the probably most common Key for that Use nowadays. (Or allow several Keys, like E and Enter as well.)
A Bug: The Player can still walk through Walls too easily. In Fact, that was the very first Thing I tried, and not too forced, though instantly I fell into the Depths of digital Nothing, descending in Knowledge I wouldn’t even be derezzed.

What is that Ambience Sound that you have used? Because it is a really good one, rather creepy as well. (As you may expect from me, I hope for a Response like »I did it myself! :] « and then I would be like ȁww, Dude, that is just awesum!«)
It would be cool if with the Opening of the Door and the Revelation of its Hindscape a minimalistic Tune of Background Music would come in.:cool:

(Hindscape, I think I just invented a new Word – Neologism for the World! \m/ )