graycontrast
Members-
Posts
16 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Everything posted by graycontrast
-
Line-Of-Sight targeting in a 2-D platformer
graycontrast replied to graycontrast's topic in Programming
So a good way to start is say have a pick from the top and bot of the character? That should be a cheap way to get LOS, I don't plan on having any narrow holes you can shoot through. Should I save that information as vertices in the bad guy script? and to be more efferent I don't want to have to check every bad guy (like ones behind the character or way way down the map), just the ones in a certain range. Is there a way to collect the objects in a certain range without iterating through all the entities in the world? -
Line-Of-Sight targeting in a 2-D platformer
graycontrast replied to graycontrast's topic in Programming
right, I am using 3-D models in a 2-D interaction. But doesn't Pick just stops at the first object in a cylinder? is there a way to do it in a 2-D area or will I have to use multiple pick commands in evenly-spaced angles? -
I am looking to implement a line-of-sight targeting in a 2-D platformer where the player presses a 'ready gun' button, moment is disabled, and a list of hitable targets is made and you can cycle through the targets. Is there a way to use ray tracing or the pick command in a 2-D area that will stop at every non-target object? If I can get those results I can make an array of targets to cycle through them. What is a good way to start?
-
I tried some troubleshooting by updating my GPU drivers, activating beta, scaling the model, and using the crawler monster none of it worked. The only thing that happened was I was able to get a shadow from one spot light, but the shadow went away when I added a player controller script. my player character and the pre-packaged crawler is not casting shadows while playing animations.
-
I am making a platformer with lights that cast dynamic shadows and when I put a script on the player model it no longer cast shadows. I tried with my custom script and the packaged "SimpleAnimation.LUA" when I attach it the shadows are no longer being made. I check the the model and light are both set to dynamic no script with "SimpleAnimation.LUA"
-
Need help creating projectiles for a platformer
graycontrast replied to graycontrast's topic in Programming
I was able to get it to work. my call for the Fire function was wrong. it was self.Fire() not self:Fire()- 8 replies
-
- projectile
- generation
-
(and 1 more)
Tagged with:
-
Need help creating projectiles for a platformer
graycontrast replied to graycontrast's topic in Programming
here is my function. function Script:Fire() local bullet = Prefab:Load("Prefabs/Projectiles/testBullet.pfb") local pos = self.entity:GetPosition() local rot = self.entity:GetRotation() bullet:SetPosition(pos) bullet:SetRotation(rot) end and I am getting an error that says " attempt to index local 'self' (a nil value)" when trying to use self.entity:GetPosition() or self.entity:GetRotation() I am not sure why self is nil in this function. those commands work in the other functions- 8 replies
-
- projectile
- generation
-
(and 1 more)
Tagged with:
-
Need help creating projectiles for a platformer
graycontrast replied to graycontrast's topic in Programming
I was able to create a prefab when pressing the fire button using the "Prefab:Load" however my problem now is that it spawns at the prefab's default position and direction. How can I get the player's position and direction so I can add a self.entity:SetPosition(x,y,z) and self.entity:SetRotation(x,y,z) to the projectile script? Is there a way to pass that to the prefab as I load it? Or will I have to search the world entries?- 8 replies
-
- projectile
- generation
-
(and 1 more)
Tagged with:
-
I am trying to create a platformer game where you can run, jump and shoot projectiles (lemons like in megaman). I am using 3-D models restricted to a 2-D plane. I already have my character running and jumping, however I am having a very difficult time trying to get shooting. I am not sure how to start. Should I have the chatterer controller script generate the projectiles? Can I make a global trigger that follows the character and emit the bullets? I am not sure where/how to generate the projectiles and where/how to do collision detection. can I have it shot a .pfb that I have made, or will it have to be a basic shape, or sprite? Thanks!
- 8 replies
-
- projectile
- generation
-
(and 1 more)
Tagged with: