Jump to content
  1. Welcome

    1. Announcements / News

      The latest. What is happening with 0 A.D. Stay tuned...

      5k
      posts
    2. Introductions & Off-Topic Discussion

      Want to discuss something that isn't related to 0 A.D. or Wildfire Games? This is the place. Come on in and introduce yourself. Get to know others who are using 0 A.D.

      37,8k
      posts
    3. Help & Feedback

      Here is where you can get help with your questions. Also be sure to tell us how we are doing. What can we improve? What do you wish we could do better? Your opinion matters to us!

      15,5k
      posts
  2. 0 A.D.

    1. General Discussion

      This is the place to post general stuff concerning the game. Want to express your love for hoplites or find people to play the game with? Want to share your stories about matches you have played or discuss historical connections to the game? These and any other topics which are related to the game, but don't have their own forums belong in this forum.

      47,8k
      posts
    2. Gameplay Discussion

      Discuss the game play of 0 A.D. Want to know why the game plays the way it does or offer suggestions for how to improve the game play experience? Then this is the forum.

      24,1k
      posts
    3. Game Development & Technical Discussion

      A forum for technical discussion about the development of 0 A.D. Feel free to ask questions of the developers and among yourselves.

      45,4k
      posts
    4. Art Development

      Open development for the game's art. Submissions, comments, and suggestions now open.

      30,5k
      posts
    5. Game Modification

      Do you have any questions about modifying the game? What will you need to do what you want to? What are the best techniques? Discuss Modifications, Map Making, AI scripting and Random Map Scripting here.

      41,9k
      posts
    6. Project Governance

      Forums for decision-making on issues where a consensus can't be reached or isn't sufficient. The committees are chosen from among the official team members, but to ensure an open and transparent decision process it's publically viewable.

      146
      posts
    7. 512
      posts
  • Latest updates

  • Newest Posts

    • The error means it cannot find the owner, (probably cause it doesn't have one) It's this code that fails: const color = QueryOwnerInterface(this.entity, IID_Player).GetColor(); cmpVisual.SetVariable("colorr", color.r); cmpVisual.SetVariable("colorg", color.g); cmpVisual.SetVariable("colorb", color.b); You can replace it with const cmpPlayer = QueryOwnerInterface(this.entity, IID_Player); if (cmpPlayer) { const color = cmpPlayer.GetColor(); cmpVisual.SetVariable("colorr", color.r); cmpVisual.SetVariable("colorg", color.g); cmpVisual.SetVariable("colorb", color.b); } but then since it cannot find the player it will not set the color
    • Yes, it's possible. You can make a mod with resized cursor images (https://trac.wildfiregames.com/wiki/Modding_Guide). Default cursor is at mod/art/textures/cursors/default-arrow.png, in-game cursors are inside public/art/textures/cursors.
    • Can the size and color of the cursor be customized? I have poor vision. Consequently I keep "losing" the cursor. To improve its visibility, I would like to make the cursor bigger and to change its color.
    • Ok, I've got these errors with the second one :    So yes, itu says that is null, so how can I call my UpdateColor function if this is null ?
    • Weird because the second one is correct The first one registers a new interface for the engine. So it should never be called outside of the first initialisation of the component in the js file (Although you could create runtime components for nefarious purposes, I would advise against it) If the first one doesn't work, it means that whatever is calling that code doesn't have that component attached, which could mean the template is invalid.
    • I think I found something but I don't know how to use the UpdateColor function in another file. I tried this :  let cmpParticlePlayerColor = Engine.RegisterInterface("ParticlePlayerColor"); if (cmpParticlePlayerColor) { cmpParticlePlayerColor.UpdateColor(); } And this :  let cmpParticlePlayerColor = Engine.QueryInterface(this.entity, IID_ParticlePlayerColor); if (cmpParticlePlayerColor) { cmpParticlePlayerColor.UpdateColor(); } I think I understand why the second one doesn't work (wrong interface) but why the first one ?    I'm trying this because i saw that the UpdateColor function is called before the owner is set, and I think that's the problem.
    • I was curious so I did some testing in this c++ reference: https://en.cppreference.com/w/cpp/algorithm/stable_sort and it seems like stable_sort() is faster when there are redundant values, but when they are made quite different on purpose, sort() is faster.
×
×
  • Create New...