HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

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 - Maldris

Pages: 1 [2] 3 4
16
First off my thanks to Tarra2012, I based my solution heavily on the code you provided and it helped imensely, thank you.

However I have a few notes for anyone using this now, based on things I found necessary.
There is also one usability issue I find myself having that someone may be able to advise me on (bellow)

I noticed that the system was auto-sorting my simple lists when it loaded them, despite println tests showing that the list was saved and actually loaded in the original order. as I wanted my lists to be able to not be in alphabetical order this was a problem.
to fix this, during the _setCollectionCellValurFromNodeRefByField( fieldName as String ) call add the following:

Code: [Select]
sortableCollection._setSortableCollectionIsSortable(false)

The issue I've been having is that I cant consistently select the row to use the sorting and delete buttons using the mouse. This can be overcome by clicking into the cells and using the arrow keys (with some fiddling around). normally I just end up clicking into the editor cell instead.
While I can just use this keyboard method, a mouse based method would be easier for being able to go back and fine tune elements order, could anyone advise me as to what I am doing wrong?

anyway, thank you once again to Tarra2012 for the basis, and I hope the mentioned optional fix and keyboard workaround is useful to someone.

17
General Discussion / Re: fields of type none are non-replicable
« on: Apr 27, 14, 02:18:03 AM »
also queuing for future news.

trying to make a new field (list of class) replicate to the client for access. cant set destination field or priority.

18
the listner is setup the same way as always simply using

Code: [Select]
oracle.createNodeListener( me, false)

which is the same as the other two oracles.

and yes I am trying to retrieve an already created spec on the client to cache and use in a ui.

19
Ive spent some time today debugging some new systems, and for the most part things have worked. however, of the 3 new spec oracles Ive created to support these, 1 never seems to receive a response when a spec is requested.

no errors are displayed in chat, console, or script errors. I have confirmed with println statements that the request does execute and is not being bypassed by logic. I have also checked spelling on all class and field definitions, and their spelling in the spec and oracles class methods.

I am somewhat confused by this due to the other two working perfectly, despite almost identical setup.

what are some common reasons that may result in a request being sent, and no events or errors being subsequently generated.

20
Im getting really talented at making myself look like an idiot.
The new association I made that was the unique source, non unique target. I accidentally made it unique to both, which perfectly explains the behaviour. Made another, was more careful, all works now.

I feel foolish, but at least it works.

seem to be making more of these mistakes lately as I jump back and forward fixing bugs ... accidentally making new ones.

thanks anyway Scott, you helped me confirm which was it was meant to work, and at least that way I knew that the setup was right, and made me check the association definition again.

21
see that's what I assumed, but when it didn't work I tried everything else.

Either way, I've had some sleep now and brain has relaxed, Ill address it again after some breakfast and see what happens.

thanks for the response Scott

22
This may seem silly but can someone please explain more fully the behaviour of unique source and unique target settings in association definitions?

I ask this due to some unusual errors I have been experiencing in my quest logging system.

To explain, I have a questLog node that hangs off the character with an association called "characterToQuestLog"
it is a hard association with unique source and target.

From there hang quest nodes using another association "questLogToQuest"

Originally this was both unique source and unique target, however when testing came around I noted that zoning would loose all but the most recent quest, and realised that this was due to the association being unique and removing the old ones.

To correct this I remade the association as unique source (required for hard association) and not unique target. This resulted in no change to the behaviour. Assuming that this was due to multiple of the same associations using the same source node, I tried to set the Quest node as the source and the questlog as the target.

Ihis had a most unexpected result. on testing the characterToQuestLog association had been removed (note: there is no remove association call for this association in ANY script at all) and this caused script errors with the replication system and any code that tried to reference the character.
In addition, I still could not get multiple quests to associate with the questlog, only a single association would form.

So at this point I am somewhat confused as to what I have done wrong, and as to how to fix it, I suspect it is due to some component of the unique source and target that is somewhat counter-intuitive, could anyone enlighten me?

23
ok, did two tests, both worked. first note, there is a small delay on the setCursorPosition, I believe the problem was my calling setIgnoreCursor too soon afterwards. I corrected this by not setting it initially, and putting an if statements at hte start of the onMouseMove event that just checks if the cursor is being ignored, and if not, making it so.

Code: [Select]
if not getIgnoreCursor()
  setIgnoreCursor(true)
.

the other method (the one I tested first, which inspired the above). was to remove setIgnoreCursor, and instead use the previously mentioned code in a method

Code: [Select]
function centreCursor()
  setCMDState("Camera", "homingMouse", true)
  screen as Vector3 = GetViewPortSize()
  println("Screen: " + screen)
  midX as Integer = Round(screen.x / 2.0)
  midY as Integer = Round(screen.y / 2.0)
  SetCursorPosition(midX, midY)
.

with the following then at the start of onMouseMove()

Code: [Select]
if getCMDState("Camera", "homingMouse")
  setCMDState("Camera", "homingMouse", false)
  return true
.

to ignore the event that was created.

both of these work, however the second results in a very jittery cursor while in use.

Hope these help someone. Appologies that I managed to solve it with just some more work.

24
ah the fun of time zones, good morning :P

and yes Ive already tried code identical to that (bar the println statement) which was placed in a separate function, and run as the first line of the camera switch function.

and while on testing it separately, it does appear to move the cursor, it also appears to only move the visual representation.

I also tried instead of using setIgnoreCursor(true) to use that to centre the mouse after each mouse move event, however this triggers another mouse move event, resulting in the camera instantly facing strait down, and being unable to be moved (intending to revisit that with a CMD state to disable it during the second move event this afternoon, when I have some more time)

25
similar to a fps camera but with an over the shoulder offset.

I use onMouseMove to handle moving the camera, that is all fine.

The issue comes when I want to trigger something on the enter or leave mouse event on an object (I used this to trigger tags to signify who to talk to, what to loot etc)

the problem is that while the mouse appears in the centre of the screen due to setIgnoreCursor(true) (I've kept cursor visible for testing) the mouse over events are triggering off to one side, where the cursor was located prior to be executing setIgnoreCursor(true)

Ive tried a few different methods to love the mouse to the centre of the screen and prevent this, however Ive had no success so far.

26
Scripting & Programming / moving Mouse not just visible Cursor
« on: Jan 12, 14, 05:32:41 AM »
ok, so I've been writing and tweaking my camera system and there is one issue that I've noticed.

using setIgnoreCursor(true) locks the cursor to the middle of the screen as I want, however mouse events, such as enter and click, still trigger at the location it was at when I ran that line.

I have tried using SetCursorPosition(x as integer, y as integer) before I start ignoring the cursor however this seems to have no effect, or at least behaves the same way and only moves the cursors visual representation.

is there a simple way to move the functional mouse location to the middle of the screen along with its visualisation so that these events still trigger correctly?
or do I have to repeatedly raycast every few frames instead? I would like to avoid this as its an unnecessary performance hit if there is a solution that can just use mouse events.

has anyone encountered this problem, and found a solution? or are able to offer advice at all?

27
ok, finally remembering to come back and update this, we figured out what was causing the problem, after rebuilding the system to make use of a new spec layout.

at some point or another, the timer field had accidentally been setup and marked for replication. When the system started replicating the timer is when the client crashed.

fortunately it was never intended for hte timer to be replicating, its marking as such was purely accidental, however I thought I would complete this post in the event that anyone else has a similar issue in the future, and to ensure that staff are aware of this issue.

28
ok, over the last few days I've been testing this. As the last the day I've been commenting most of the systems code out and uncommenting it section at a time to figure out what's causing the crash.

Obviously it turned out to be the last line of the whole system. Then the last line of that method that it called.

Ultimately it was in this method:

Code: [Select]
method _addWaitToReplicationGroup(wait as NodeRef of Class Wait_Request)
  println("wait is: " + wait)
  replicationGroup as NodeRef of Class _ReplicationGroup = me._getReplicationGroup( true )
  if not replicationGroup._IsNodeReplicated(wait)
    println("wait is not replicated")
    replicationGroup._ReplicateNode(wait)
  .
.

specifically the line:

Code: [Select]
replicationGroup._ReplicateNode(wait)

which confuses me as literally the same line is used to replicate other parts of the stage without issue.
I have checked, all the replication parameters are set correctly on the class wait_request. I'm truly confused as to what is going wrong. Would anyone have any suggestions?

29
ok, I have been working on a quest system of the last while, recently when I added a chat command to add quests to the quest log I initially had no problems (other than having to work out logical errors in the way the quests progressed)

Then one day I signed in and told the character node to set-up the questlog (I delete it after I'm done testing each time until the system is bug free) then told it to create a quest (the same testing quest Id been using). At this point, I got a disconnect error. Upon trying to reconnect to the server I found I was unable to (until some time later) and recieve an error message (image attached)

Today I added several printLn statements through the code from the start of the chat command, all the way through. I then deliberately reproduced the bug in the hope it would spit out the printLn statements and Id find where the error was. Unfortunately none of the printLn output messaged showed up in the console before I disconnected. I also recieved a different error when I tried to reconnect.

The interesting part about all this is that when I am able to sign in again, the quest system is set-up and the nodes exist as though it executed it all correctly, however it kicking the user whenever they receive a quest is not really a good feature :P

I've attached here the console error I receive when I disconnect as well as the two different errors I've received trying to login

17:32:10: Refreshing serverScriptOrganizer.
17:33:40: !ERROR!System:Connection to Server Lost: Connection Lost
17:33:40: !ERROR!System:GUIGhostInterface::Build(RFIF): GOM ERROR: GOM::addNodeFromPrototype (10554): error: with InternalException message 'Unable to create an instance from the prototype(1000000291), as it is not a valid prototype id.' node=1000000290
17:33:40: !ERROR!System:GUIGhostInterface::Build: Failed to create GUI control. name=GUIPanel
      
Has anyone else experienced this kind of issue? or can anyone advise me as to what may have happened?

30
This was a discussion we had the other day when looking at something some friends were making in a single player title, not actually related to our plans but I'm curious as to what people think.

In most online games, when you encounter a monster much larger than you (particularly something with multiple lets (Especially if you can walk under it)) and your only recourse for attacking it is to either; attack it with ranged weapons, or stab it in the ankles as you cant reach any higher.

so the discussion we had was how would you get around this to make a more engaging experience for the player?
shadow of the colossus did a great job in this regard, letting you climb the monster and so on, however this may not be particularly practical in an online game (due to issues of lag and timing)

we had the thought of compositing large creatures of several smaller 'logical creatures' that when killed would change the animations of the creature (say you sufficiently wound the foot, it starts to limp or falls over and you can attack its head)

what other methods would other people use? I'm curious to see how other people approach it.

Pages: 1 [2] 3 4