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 - FI-ScottZ

Pages: 1 2 3 [4] 5 6 ... 93
46
Art & Art Pipeline / Re: Loot Beam
« on: Apr 13, 17, 06:38:58 PM »
Quote
imho I would do classic "Grandmas Boy" and just change the color of a single FX for different levels of loot by manipulating one of the FX's layers diffuse.
I did think those dwarves on level 4 looked too similar to the elves on level 6. ;D

47
DirectX End-User Runtimes (June 2010):

A DirectX redistributable installs as part of the install process.
However, this sometimes does not work correctly do to some local configurations or virus scanners issues.
Turn your virus scanner off, install this redistributable DirectX from Microsoft
http://www.microsoft.com/download/en/details.aspx?id=8109
then reboot and turn the virus scanner back on.

48
General Discussion / Re: date / time ?
« on: Apr 07, 17, 09:30:54 AM »
Good point. I see in particular the script TMP_TooltipsClassMethods went from 4/07/17 04:17 to 4/07/17 01:53.

The Script Editor is a time machine. ;)

49
Design & World Building / Re: Music
« on: Mar 21, 17, 03:04:02 PM »
Has anyone managed to get music to play in an area?

Ive tried following the sound tutorials and info on the HE wiki with no luck at all.

Which tutorial?

51
More details here:
http://hewiki.heroengine.com/wiki/RemoteCall2

If a node is replicated to a client then it is defined both on the server and client, and has the same node ID on both sides.

"call client" will be for calling to either a single specific client ID, or a list of client IDs.  If node is only defined on the remote side and not on the calling side, you cannot simply assign the node ID to a nodeRef variable to make the call. That is because when you assign to a nodeRef and it cannot find that node locally, the nodeRef becomes None and calling a method with that results in a script error. What you can do in that case (I think) is assign the ID to a variable of type ID instead of nodeRef and then call the method on that variable.

"call clientreplicas" is handy when you know the node is replicated to 0 or more clients and you just want the call going to all clients which currently have it without having to specify exactly which clients those are.

Besides calling a method on a node, you may call a function in a script by specifying scriptName:FunctionName().

You can remote call to a method of a system node by using the % symbol in place of the $ symbol when referencing the system node name, e.g.

call client someClientID %SystemNodeName.methodName()

The "%" means that you are referencing a system node on the other side as opposed to a system node on the calling side. That is because both sides could have a system node with a given name, but not necessarily be the same node ID.



Whether it be a function or method:
  • Client ones to be called from the server must be labeled "remote".
  • Server ones called from a client must be labeled "untrusted" (which is also a visual reminder that you should confirm the validity of the request to cut down on cheating).
  • Server ones called from other server areas must be labeled "remote".

52
I don't recall any such setting for height. But I think rain stems from one of the built-in shaders.  Investigating the contents of that might provide a way to change how it renders.

53
GUI Creation / Bug Found in GUI Editor Save Code
« on: Mar 04, 17, 09:55:44 PM »
I have noticed that when I use the GUI Editor, if I try to set a texture name into the material field of a control's alphamask AND set that alphamask size or position to anything non-zero, there is an error in the Console panel when I try to save the GUI:

Quote
ERROR:HeroScript::HeroMachine::ScriptError:Bad XML: Missing starting <

If I only set the position/size OR only the material, it saves fine.

For instance, setting only material will result in a line like this:
Quote
<alphamask material="SomeTexture.png"/>

Setting only size will result in lines like this:
Quote
<alphamask>
  <size x="213" y="257"/>
</alphamask>

But if I set both size and material and try to save, it attempts to write lines like this:
Quote
<alphamask>
  <size x="213" y="257"/> material="SomeTexture.png"
</alphamask>

You can see that the material setting is being placed after the size setting instead of immediately after the keyword "alphamask".  That results in the error since there is no "<" before "material".

I tried to read through the code to understand where it is going wrong, but could not track it down.  Anyways, it can be bypassed by manually writing the code properly in the xml file so that it looks like this:
Quote
<alphamask material="SomeTexture.png">
  <size x="213" y="257"/>
</alphamask>

Just thought I should pass this along so it can be corrected in-engine at some point.

54
GUI Creation / How to Delete FX Subgroups
« on: Mar 01, 17, 12:13:52 PM »
If you have ever worked in the FX Spec Editor you should know that you can right-click on a task to get a popup menu to delete it. But you may have noticed that it does not work for the subgroups that might be there. (The picture below shows a sample hierarchy. The main cluster with the larger FX icon is considered the "Group" and when you drag an FX box onto it that creates a subgroup.)

Anyways, looking at the code I realized the authors had put in the Delete popup menu for _FXTaskIcon controls, but not for _FXIcon controls, which are the ones used for the subgroups.

So here is what I did to the client script _FXIconClassMethods, all based on how deleting _FXTaskIcon's works:

First I added the blue code to the ActivateProxyIcon() method:

Quote
method ActivateProxyIcon(args references Class GUIMouseEvent)
  //------------------------------------------------------
  // Clicking means we have selected this icon and want to
  // display it's properties
  //------------------------------------------------------
  #if debug
    println("ActivateProxyIcon()")
  #endif
  var fxe = $FXEDIT
 
  fxe.UnSelectAllFxIconsInBrowser()
 
  if (me.IconSubject <> None)
    #if debug
      println("node = " + subj)
    #endif
    var keys = $GUI.GetKeyStates()
    var screen = GetViewPortSize()
    editor as NodeRef of Class GUIControl
    if args.rightButton
      CreateRightClickPopupMenu(me)
      me.openPopupMenu()
      args.interrupt = true
    else
if keys.altKey
      //---------------------------------------------------------------
      // This brings up josh's generic node editor which I have left in
      // only for occasional debug purposes
      // It SHOULD NOT be used for real editing
      //---------------------------------------------------------------
      editor = CreateNodeFromPrototype("NodePropertyEditor")
      editor.build = true
      editor.position.x = screen.x - editor.size.x
      editor.position.y = 0
      editor.PopulatePropertyEditor(me.IconSubject)
    else
      fxe.DisplayPropertyWindowForSubj(me.IconSubject)
    .
  else
    #if debug
      println("No subject")
    #endif
  .
.

Then I copied over these two methods from _FXTaskIconClassMethods into _FXIconClassMethods:

Quote
function CreateRightClickPopupMenu(c as NodeRef of Class GUIControl) as NodeRef of Class GUIControl
  popupMenu as NodeRef of Class GUIControl = c._addCleanEnginePopupMenu()
  popupMenu.script = SYSTEM.EXEC.THISSCRIPT
  //-------------------
  // Add the menu items
  //-------------------
  var menuitem = popupMenu._addPopupMenuItem("Delete")
  menuitem.script = SYSTEM.EXEC.THISSCRIPT

  popupMenu._autoSetPopupMenuSize()
 
  return popupMenu
.
shared function onPopupMenuSelection(myMenuItem as NodeRef of Class GUIControl)
//  println("onPopupMenuSelection menuitem: " + myMenuItem + " name: " + myMenuItem.name)
  when myMenuItem.name
    is "Delete"
      var menu = myMenuItem.rootParent()
      if menu <> None
        var icon = menu.getMyPopupOverlord()
        if icon <> None
          where icon is kindof _FxIcon
            subj as NodeRef = icon.IconSubject
            if subj <> None
              $FXEDIT.GetFxConfirmDeleteNodeDialog(subj)
            else
//              println("no subject")
            .
          .
        else
//          println("no icon")
        .
      else
//        println("no menu")
      .
    .
    default
//      println("Menuitem was: " + myMenuItem.name)
    .
  .
.

With those changes in place, you can right-click subgroups to delete them and everything inside of them.

55
Scripting & Programming / Re: Area loading question
« on: Feb 28, 17, 01:11:42 PM »
    We have such a system set up for our game to be able to send a group of players to a fresh instance of a given game area.  It is rather complex, but here is the gist: (all called on the World Server via remote calls)

    • We determine an instance # of the desired area that is unused. (We use a system node to track the instances of game areas which are reserved)
    • If we find a valid instance, we call LaunchAreaServerInstance().  That could be done via the methods:
      var listener = $WORLD._createAreaLaunchScriptListener(ourCallbackScriptName)
      $WORLD._RequestLaunchAreaServerInstance(areaID, newInst, listener, explicit)

      but we just decided to do it directly via the external call.
    • If that launch function was successful, we add the players that will be going there to the _TravelAccountQueueMap via a call to: (done for each playerID)
      $Travel._ProcessAreaInstanceTravelQueueAddition(playerID, areaID, newinst)
    • We have a system node override for the $TRAVEL system node, and we define the override method:
      method HE_AreaSpinupTravel(areaID as ID, instanceID as ID) as Boolean
      After LaunchAreaServerInstance() is called, this $TRAVEL method is called once the new instance is ready.
      Players in the $Travel.TravelQueueMap will be sent to the area instance automatically AFTER this method.

    There is a comment above the definition of unique method _AreaSpinupTravel:
DEPRECATED: please use ObsListener to catch _systemArea_OnAreaRegister/Unregister/RegisterFailed events, then call _RequestTravelAreaSeamlessLinksForArea.

So, you might want to go ahead and do it like that via the listener.  The difference is then that is asynchronous, while we wanted an approach that synchronous, which is what LaunchAreaServerInstance() is.

Either way, whether by notification via your listener, or handling HE_AreaSpinupTravel() that is when you know the instance has spun up and the players are being sent there.[/list]

56
Scripting & Programming / Re: Area loading question
« on: Feb 26, 17, 01:31:42 PM »
Are you doing seamless or non-seamless travel between areas?

57
Scripting & Programming / Re: Unstable external function
« on: Feb 17, 17, 10:24:39 AM »
A guess, but maybe that happens when your tgtPos and myPos are the same, leading to a vector that is all zeroes and thus can't be normalized.

58
Developer Hero Projects / Re: The Exile MMO project
« on: Feb 15, 17, 12:54:56 PM »
Congrats!

59
GUI Creation / Re: Displaying text on the screen
« on: Feb 06, 17, 10:51:57 AM »
Gloria beat me to it, but here are some more details:

Yeah there is a control called _label that is for displaying text. Knowing that all GUI controls are in fact prototypes of GUI classes, the simplest form you could do something in code like create a label node:

Code: [Select]
myLabel as NodeRef of class GUILabel = CreateNodeFromPrototype("_label")
myLabel.build = true

The "build = true" line is very important.  That line causes the structure of the control to be built and any gui control created needs to have that put somewhere after it is created. If there are any child controls, they are not created until after build = true.

The GUILabel class has a field called "text" that defines what text it displays. There are also other properties such as defining the font to use and how it is justified, e.g. centered, left, right, etc.

Like all GUI controls, there are properties of position and size to determine the rectangular space it will occupy in its parent, which is the screen by default.

Make sure you store that label reference so you can later delete it or hide it.  Like all nodes, you can use DestroyNode() if you want to just get rid of it.

Note that for anything more complex, the GUI Editor is the preferred method for designing GUI's rather than trying to set every property in code.

See these pages for some more details:
http://hewiki.heroengine.com/wiki/GUI_Controls#GUILabel
http://hewiki.heroengine.com/wiki/GUI_Label_Markup
http://hewiki.heroengine.com/wiki/GUI_Editor

60
Scripting & Programming / Re: Mouse handler and Stateful object
« on: Dec 20, 16, 04:05:32 PM »
Sure thing.  Note that it only sends the event if it is Click or DoubleClick.

It does make me think it is maybe a little in efficient in sending messages to the server for every mouse click event, even if you don't need that.

It probably would be better to only send the event if it was somehow flagged to do so, and then have the flag off by default. Then it is not sending unnecessary network traffic.  But maybe it doesn't amount to much.

Pages: 1 2 3 [4] 5 6 ... 93