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

Author Topic: Programmatically loading assets  (Read 1646 times)

NestEggs

  • World Owners
  • ****
  • Posts: 24
    • View Profile
Programmatically loading assets
« on: Mar 23, 14, 02:09:15 PM »

Hi folks,

How do you load assets from the library programmatically? I'm able to load models but they are missing textures and I am unable to hit test them.

Thanks,
Chris
Logged

WorldWideZ

  • World Owners
  • ****
  • Posts: 524
    • View Profile
    • World Wide Zed
Re: Programmatically loading assets
« Reply #1 on: Mar 23, 14, 02:19:34 PM »

depends on the effect you want , but you could try the Dynamic Replicated Object tutorial on the wiki , or you might examine the use of prop buckets , or you can directly hook into the edit system too
Logged

NestEggs

  • World Owners
  • ****
  • Posts: 24
    • View Profile
Re: Programmatically loading assets
« Reply #2 on: Mar 23, 14, 02:35:11 PM »

In the tutorial (http://hewiki.heroengine.com/wiki/Your_First_HSL_Script) you first add the asset via the Library and then attach your class to it with /mnac. I want to add the asset programmatically including any mesh/properties information that goes along with the model. I have found some pages about material properties but I am hoping there is an abstraction for loading this stuff.
« Last Edit: Mar 23, 14, 02:46:07 PM by NestEggs »
Logged

NestEggs

  • World Owners
  • ****
  • Posts: 24
    • View Profile
Re: Programmatically loading assets
« Reply #3 on: Mar 23, 14, 02:42:40 PM »

It looks maybe I need to load the *_exact_mesh.nxl and *.physx files along with it?
Logged

WorldWideZ

  • World Owners
  • ****
  • Posts: 524
    • View Profile
    • World Wide Zed
Re: Programmatically loading assets
« Reply #4 on: Mar 23, 14, 03:55:53 PM »

i think you might be looking for the $edit system node on the server
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Programmatically loading assets
« Reply #5 on: Mar 23, 14, 06:41:12 PM »

wouldn't you want to use the prototypes to allow you to instantiate the items with any special instructions with them.

Also could look into prop system if you need to have them act special depending on the player etc.

As in till player has completed task A the doors are shut, when task A is done doors are open for them deals.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

NestEggs

  • World Owners
  • ****
  • Posts: 24
    • View Profile
Re: Programmatically loading assets
« Reply #6 on: Mar 23, 14, 08:10:47 PM »

It looks like the prop system is what I'm looking for thank you!
Logged

JoshHalls

  • Founding Professional
  • *****
  • Posts: 335
    • View Profile
    • The Repopulation
Re: Programmatically loading assets
« Reply #7 on: Mar 27, 14, 12:50:38 AM »

Just as a side note, would avoid using $edit unless there is absolutely no other choice. It sends a lot of information over initially and you typically have to increase the bandwidth throttle if you use it a lot. At least our experience with the system, we mostly use client side props unless the server needs more information that what can be provided.
Logged
Co-Owner/Programmer - The Repopulation