A mouse controled RPG

New Spiders Models.
I was fed up with the red ones. I used references to make the new ones, and now, we really wanna strike them, here you go :


and from the top.

Still anyone about my Over function not correctly handled by linked objects?

In the other file you created another mousepointer? Because, if you did, then the mousepointers in the different files may have different properties/logic bricks from each other. However, you may have just linked the mousepointer into the other file, in which case I’d have to see it in order to try to figure it out.
Thanks,
Micah

My Mouse pointer is a simple textured cube in an overlay scene of the main file.
The objects I link are just the props and objects.
Monsters and big meshes will stay in the main file because I won’t have so many.
The props in another hand may become numerous, so separate them from the beginning seemed a good idea.

I discoverd, even if it’s totally normal, that debuging a module resets the global variables. I spent too much time on a small problem before I found it out lol.
But still those to imported objects doesn’t behave the same way, it’s a problem.

Another point, it seems that we can’t change the bound option, always the default sphere bound…
Does linked objects not able to bound by convex hull?

Ok, I found what’s wrong. The dynamic attibutes has to be defined in the source file and not in the included file. I figured out that thanks to the yo Franky! project I’m analysing at the moment.
New stuff here is the monster killed leave a drop. New mouse pointer over the takeable elements.
The life potions are drunk straight for instance as no inventory system yet…
Here is the video:
http://www.youtube.com/watch?v=3L_UUJf-87Q
Bonus, a better quality potion pic :slight_smile:
http://img412.imageshack.us/img412/241/potionb.th.jpg
Enjoy.

Hi, to answer a question commented on a youtbe video :

My player moves in 2 steps:

  • edit object actuator Track to my waypoint (named cursor)
  • add velicoty to the player object as it’s a rigidbody.
    To stop I have a sensor Near (dist 1.00 and reset 1.20) that sends a signal to this python script.

import GameLogic as G
import Mathutils as M

cont = G.getCurrentController()
scene = G.getCurrentScene()
own = cont.owner
sen = cont.sensors["sNearTarget"]
cursor = scene.objects["OBCursor"]

#We are near the target
if sen.positive:
	own["nearSensor"] = True
	own.setLinearVelocity( M.Vector([0, 0, 0]), True )
	#We also hide the cursor
	cursor.visible = False
else:
	own["nearSensor"] = False
	cursor.visible = True

Hope that helps.

allright mate =D I did it with a radar and colision sensor. I didnt tryed the near sensor :slight_smile: thnx mate

Another question how do u parent the camera to the player independently to the position, not the rotation. get position(player) => set position(camera of player) ?. Would be nice if u tell me your secret =) :slight_smile:

If I recall well, I parented the camera to an empty.
This empty handles its rotation by keyboard (the camera being parented orbits around).
I also added an always sensor to that empty with the actuator copy location.
This way if the player turns, the empty doesn’t (that’s the trick) but still it follows the player.

Hope that helps :wink:

sry that I go on ur nerves where can I find the copy location actuator (I didn´t saw this option in my 2 years of studying blender _) Constraint location? a.s.o

Damn, I was wrong on this, it’s a small python script as controller on the empty.
You couldn’t find it lol, my mistake.
Here is the script:

import GameLogic as G
scene = G.getCurrentScene()
cont = G.getCurrentController()
owner = cont.owner
player = scene.objects["OBPlayer"]
#Simply copy the location
owner.localPosition = player.localPosition

thnx for help it work but u forgot scene = G.getCurrentScene() :stuck_out_tongue: :slight_smile: :slight_smile:

I fixed the post, I thought it was a useless line lol.
Thank you.

Hi folks,
Here is my first spider run cycle test.
http://www.youtube.com/watch?v=mdAld_hrr7w
I’ll try to include that in the game, as I finnished the follow player actions for these monsters.

keep blending mate =D

I managed to do everything but I have another problem.
My “Tract To” actuator doesn’t track my player object.
My monster comes from a separate file, is there something special to do to make this work from seperated files?
My player is on the main file for instance, but I’ll include the chevalier very soon.
Will it work if I put monsters and player charac in the same file?
I think the setup of YoFranky is more complicated but I don’t need so much sophistication.
Thanks for your tips…

Well hello everyone, im working on a game atm, im doing the graphics in blender and animations, cycles, things like that, then my freind is going to use the gamebryo engine for some other stuff, i certainly would like some input from you guys! any suggestions, pm me.

For getting any specific help you can open a thread in the blender game engine support forum.

Hi guys,
Here is a simple animation integration.
http://www.youtube.com/watch?v=ZCGoLBJ-B10
I encouter collisions problems but I’ll work on it.
I also changed the rig of the chevalier, I have to finish it.
Your impressions?

Hello, I’m rewritting my player move system at the moment.
I have a strange behavior. A simple click on the floor doesn’t always make the character move. But dragging works well (this is a new feature I’m really happy with).
I guess my mouse click sensor is not handled properly, but I can’t find why, can one of you have a look at my script?
Here is it :

import Rasterizer as R
import GameLogic as GL
import Mathutils as M

R.showMouse(1)

scene = GL.getCurrentScene()
cont = GL.getCurrentController()
player = cont.owner



# >>> Objects needed

#sensors
mouse = cont.sensors["Mouse"]
lmb = cont.sensors["LMB"]
collid = cont.sensors["Collid"]

#The actuators
ori = cont.actuators["Oriente"]
move = cont.actuators["Move"]

#The cursor object
cursor = scene.objects["OBCursor"]

# <<<


#We can (de)activate the follow system here
###########################################
def followSystem(status_, trackTo_):
	
	if status_==True and trackTo_!=None:
		player["Debug"] = "On the go " + trackTo_.name
		
		#Changing the tracked object?
		ori.object = trackTo_
		
		#Activate the track actuator
		cont.activate(ori)
		cont.activate(move)
		
	else:
		player["Debug"] = "At destination"
		
		#Clear the target object
		ori.object = None
		
		#Deactivate the track actuator
		cont.deactivate(ori)
		#Deativate the Move actuator
		cont.deactivate(move)
			
		#Stop the player in place
		player.setLinearVelocity(M.Vector([0, 0, 0]), True)



#MAIN CODE
##########

#We click ? Update the cursor waypoint position
if lmb.positive:
	
	#The data from the mouse
	target = mouse.hitObject
	
	#TODO : check the object clicked
	#Make ennemies clickable and objects...
	if target.has_key("Attackable"):
		cursor.visible=False
		followSystem(True, target)
	
	#Ground click
	elif target.has_key("Ground"):
		#Positionning the cursor
		cursor.worldPosition = mouse.hitPosition
		cursor.visible=True
		followSystem(True, cursor)


#Arrived near the waypoint or we collid with something?
if (collid.positive and collid.hitObject==ori.object) or \
	ori.object==False:
	
	followSystem(False, None)
	cursor.visible=False

else:
	followSystem(True, ori.object)

Thank you very much for your help.

Edit : A picture of the logic bricks attached to the player, may be helpful to understand all my stuff I guess.


I managed to make it working.
The clickable elements can become waypoints now. It was my goal by changing to this new system.
But my character doesn’t detect collisions with normal waypoint (the yellow diamond…)
But other objects are perfectly handled. It’s the same controller and the same sensor.
Any clue, need what elements to help?
I can post the entire project archive but it’s big (10Mo about I guess).
My character is also not touching the ground when moving to another room at a lower level.
I know it’s because I apply a constant velocity toward the waypoint. Is there a good way to implement this king of behavior? I don’t ask for a total solution, but just for a method.
Are there example somewhere I can analyse?
Every body handles moves by keyboard, but it’s a really easy way and doesn’t fit my goal.

At the same time I’m loosing motivation as I see so many problems and so few solutions and help…