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

Pages: [1] 2 3 ... 9
Thanks, but I am not trying to round floats to integers... which is what all those do...

If there was a round to 1 decimal that would work.. but there isnt.. and the standard math way of doing that (ie  round ( x*10) / 10 ) doesnt work since the division just sends it back to the incorrect figures it started with..

Is there anyway to adjust Hero's floating point precision ( which is what I assume is causing the following)

The following code:
  val as Float = 17.0 / 10.0
  println("Floating Point Test: "+ val )
  val  = 18.0 / 10.0
  println("Floating Point Test: "+ val )

produces these results:

[hsl_debug] 9223372056477021789,3: SCRIPT[cmdMob]: Floating Point Test: 1.700000048
[hsl_debug] 9223372056477021789,3: SCRIPT[cmdMob]: Floating Point Test: 1.799999952

in other languages, or in a calculator, this would show:  1.7 and 1.8

Checkout the _SO_appeared event - that should be firing immediately...

from the wiki:

There are four types of events generated by the Spatial Awareness System

Appeared - Entity is within the subject's awareness at the time it is added to the system

Entered - Entity has entered the awareness range of the subject

Disappeared - Entity disappeared from the subject's awareness by virtue of being removed from the awareness system

Departed - Entity has left the awareness range of the subject

Scripting & Programming / Re: Persisted node available anywhere
« on: Feb 17, 13, 04:36:14 PM »
Thanks Grim - System Areas do read like the correct method, I hadn't come across that wiki page.

I did attempt this using a system area - but the nodes created were not available outside that area...   I must have missed something - I'll dig deeper into it

Scripting & Programming / Re: Persisted node available anywhere
« on: Feb 17, 13, 10:45:48 AM »
Nope - Arbitrary root nodes are saved in the area - so they are lost when you move from one area to another... you could move them from one area to another if you had to ( like the character root node ) - but that would result in multiple copies of your nodes.. one for each area...

so.. nope...

Scripting & Programming / Re: Persisted node available anywhere
« on: Feb 17, 13, 04:14:54 AM »
After working on this for quite some time - I can not find anything that works.

System nodes do not persist across areas... so you cant load data into a system node from CSS then use it later in another area

I simply can not find anyway to store a collection of persisted nodes, that need to change, across all areas.

It seems the only thing that would work would be to create a prototype that has all the data you want to use - but that cant be updated dynamically in a production world.

Can anyone point me to a way to achieve this?

If you have say, 100 nodes that contain some basic data.. and you want to persist those and load them once upon world load...   what is the best way to do that?

After doing some forum/wiki research...

I am thinking of something along the lines of:

Create an arbitrary root node in a system area ( say.. character selection )...
Associate the nodes to that ARN

Upon world load.. load the ARN.. add the data to a system node for usage...

does that make sense?

ahhh... ok...   thanks.. I didn't pick up on McMagic's instanceId = 0 being not edit mode...

cool.. i'll do that.

Scripting & Programming / Re: getElement beyond end of list
« on: Feb 15, 13, 03:26:12 PM »
Hey Craig,

Both this one and your PostEvent thread appear to point o an issue in you AiAgent scripts..

this one from _AiAgentClassMethods line 74
and the postevent from _AiAgentClassMethods line 78 i think it was...

whats going on in that scripts on those lines?

Scripting & Programming / Re: [Resolved] Player Client
« on: Feb 15, 13, 06:52:48 AM »

I have gotten the client to work.  Here is the modification to the character selection that we have done:

This is in an class glomed onto the CHARACTERSELECTIONSYSTEM vis F5 tools.

This works as show below.

The line that was breaking it is:

cam as NodeRef = GetActiveCamera()

There were no errors returned or displayed due to this line.

Do you have any idea why GetActiveCamera() would not work in the Player Client while it does work in HeroBlade?

method HE_CSSInvokeGUI( args as LookupList indexed by String of String ) as Boolean

//cam as NodeRef = GetActiveCamera()
//if (cam != None)
//SetCameraPosition("FLY", "1,1,1")

css as NodeRef of Class GUIControl = _GUICSSCharacterSelectionClassMethods:Open( args )
gui2 as NodeRef of Class GUIControl = CreateNodeFromPrototype("hh_logo1")
gui2.build = true
$myGUI.guiToggles["main_logo"] = gui2
return true

Scripting & Programming / Re: [Resolved] Player Client
« on: Feb 15, 13, 06:33:33 AM »

The only "Error" I saw  was a warning about the depreciated LoadFontResource function.  I have removed that and the result is the same.

This is the console output from HeroBlade at the point of character selection:

07:30:10: HeStartup Call...
07:30:10: SYSTEM:System:Windows version: 6
07:30:10: SYSTEM:System:Game Scale set to: 10.00
07:30:10: SYSTEM:System:Initializing HeroBlade DLL
07:30:10: SYSTEM:System:SelectionManager::Startup()
07:30:10: SYSTEM:System:GUIControl::SetupScreen()
07:30:10: SYSTEM:System:AudioManager()
07:30:10: SYSTEM:System:Audio plugin [FMOD] initialized successfully
07:30:10: SYSTEM:System:DebugVisualizer Setup
07:30:10: System:HeroEngine Client DLL told version is:
07:30:13: SYSTEM:System:BaseApplication::initialize   Service_Directory_Client   1360931412966   8
07:30:16: SYSTEM:System:LR:setDefaultCacheSize
07:30:16: SYSTEM:System:LR:setDefaultCacheSize done
07:30:16: DreamManager connected
07:30:18: SCRIPT:[_InputHandlerClassMethods]:_OnKeyBindingsLoaded: , /heroenginekeybindings.ini
07:30:18: SCRIPT:[_InputHandlerClassMethods]:_OnKeyBindingsLoaded: , /gamekeybindings.ini
07:30:19: SYSTEM:System:  Activating Segment: demoland
07:30:19: SYSTEM:System:Reset the synchronized clock.
07:30:19: SYSTEM:System:ActivateAreaSpec 3758002374 assigning ID 1 instance 1
07:30:19: System:SetSkyDomeAsset 0 into Auto in Character Selection
07:30:19: SYSTEM:System:Character Selection (3758002374) activate
07:30:20: SCRIPT:[_characterSelectionClassMethods]:Got updated names...

What "Errors in your world" are you referring to?

Scripting & Programming / Re: [Resolved] Player Client
« on: Feb 14, 13, 12:06:57 PM »
Well... the problem is that it doesnt function the same way as HeroBlade.

I log in via HeroBlade and the character selection GUI pops up - all is good.

I log in via the player client - the GUI doesnt come up - nothing else can happen.

Thanks for the clarification - my understanding of _OnReplicationGroupAdded() was off...

I'll follow your advice

Yep.. however.. that method is called as each node is added - but.. I have no idea when ALL nodes have been added... ie:  _ONReplicationNodeAdded would be called 10 times...  but... nothing says.. ok.. I have all 10 nodes...

Now - I could send something that says...  "You have 10 nodes total.." then have a counter that ticks on each onReplicationNodeAdded event... 

However, with _OnReplicationGroupAdded()  oout there.. i wondered if there is a better path...  as creating a field just for this on any class that nedds it seems a bit strange..

Say you have node representing a crate... and it is replicated to the client...

The client clicks the crate.. and you now replicate the 10 nodes the crate contains to the client...

How do you know when all 10 nodes have finished replicating?

If I add the 10 nodes to the creates replication group, then  _OnReplicationGroupAdded()  doesnt fire on the new nodes...

If i create a new replication group for the nodes...  the nodes are replicated everytime the crate is clicked instead of once...

Whats the best way to handle this?


Pages: [1] 2 3 ... 9