FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - 1cyborg

Pages: [1]
1
Help and troubleshooting / Re: How to build/install FIFE on Windows 7?
« on: January 06, 2014, 03:20:17 pm »
I had a similar issue with this. It seems that the settings file it is looking for is located in the directory you are trying to run the demo from, not the settings file in the directory the run.py file is. I had good luck with changing the working directory in the command prompt to the directory the demo was in (using the cd command).

I think the demos sometimes (or some of them) try to create the settings file if they can't find it. That seems nice, but when I was trying to run the demos from the start menu, they didn't have write access in the directory they were in and so failed until I ran them with Administrator privileges. After running them as Administrator once, they created the settings files and I could launch them normally. Same with the map editor.

Not sure if that would work for you, but it sounded similar to my frustrating problem.

2
TL;DR: I'm trying to move characters (instances in FIFE parlance?) up and down (in the z-axis), but stuck on how to do so.

I'm currently using the map and skeleton from the tutorial1c, but changed a bunch of the code from that tutorial to be more in line with the shooter demo so that I can use WASD keys for movement instead of clicking. I've got the player moving in the x/y axes with WASD well, and I'm essentially doing that using:
Code: [Select]
                curloc = self.location
                exactloc = curloc.getExactLayerCoordinates()
followed by
Code: [Select]
                elif self._scene.keystate['S']:
                        exactloc.y += 1 # SOUTH
                        self._statechanged = True
followed by
Code: [Select]
                curloc.setExactLayerCoordinates(exactloc)
                self._location = curloc
followed by
Code: [Select]
                if self._statechanged:
                        self._instance.move('walk', self._location, 4.0)


I want to raise/lower the skeleton/character using the E and R keys, respectively. My first (and only) thought is to essentially use the same type of system because it worked for x/y:

Code: [Select]
                elif self._scene.keystate['E']:
                        exactloc.z += 1 # UP
                        self._statechangedZ = True
followed by
Code: [Select]
                if self._statechangedZ:
                        self._instance.move('stand', self._location, 4.0)
with the curloc bits the same as before (it's all in the update function which I can post if desired).

This doesn't work. I'm printing exactloc to the console, and exactloc's z value does change when the E key is pressed, but reverts back to 0 as soon as it is released, like so:
DoublePoint3D(0:1:1)
DoublePoint3D(0:1:0)

What I'm looking for is a way to have the player ascend/descend. I'd prefer the result be some sort of motion in the x,y,z grid, but if it isn't possible, simulating up/down movement would also be fine I think. Any pointers?

(I do some scripting for my job, so coding isn't foreign to me, but python is - learning python is part of the reason I'm undertaking a little project and may just be missing something obvious. Thanks!)

Pages: [1]