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
  • Who's Online   0 Members, 1 Anonymous, 128 Guests (See full list)

    • There are no registered users currently online
  • Latest updates

  • Newest Posts

    • So I put warns in UpdateColor function class ParticlePlayerColor { Init() { this.UpdateColor(); } UpdateColor() { let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual); if (!cmpVisual) return; const color = QueryOwnerInterface(this.entity, IID_Player).GetColor(); cmpVisual.SetVariable("colorr", color.r); cmpVisual.SetVariable("colorg", color.g); cmpVisual.SetVariable("colorb", color.b); warn(color.r); warn(color.g); warn(color.b); } OnOwnershipChanged(msg) { if (msg.to == INVALID_PLAYER) return; this.UpdateColor(); } } ParticlePlayerColor.prototype.Schema = "<empty/>"; Engine.RegisterComponentType(IID_ParticlePlayerColor, "ParticlePlayerColor", ParticlePlayerColor);   And that's the result for Blue :  Red : Green :  Yellow :    Maybe you hacked something else that i don't have on my version ? x)
    • Hmm that's really strange because I tested that code earlier and I had blue and red dust X) And yeah emission rate has to be constant I hacked the foundation code that relies on builder numbers. What values do you have in player colors ? I will test some more tomorrow
    • Ok some weird things happened. To test your code, I have to put the emissionrate on constant, if I don't do this I can't see anything. The result is the screenshot linked to the post. I put the <ParticlePlayerColor/> in the building template as you said, i put warns so I can say that the component is working.   But as you can see, the result is not what I really want   After some tests, I can see the colour changing when testing your code, but it seems like it's changing on greyscale, the dust appears a little darker but not blue.   After more tests, I thinkn the problem is not resolvable by this way because we can't change the RGB of the texture directly, so I can't have red particule for red player, blue particles for blue player etc... 
    • <?xml version="1.0" encoding="utf-8"?> <particles> <texture>art/textures/particles/dust_256a.png</texture> <blend mode="over"/> <expr name="emissionrate" from="numbuilders" mul="50.0" max="200.0"/> <uniform name="lifetime" min="3.0" max="5.0"/> <uniform name="position.x" min="-8.0" max="8.0"/> <uniform name="position.z" min="-8.0" max="8.0"/> <constant name="position.y" value="1.0"/> <uniform name="angle" min="-3.14" max="3.14"/> <uniform name="velocity.x" min="-1.5" max="1.0"/> <uniform name="velocity.y" min="2.0" max="3.5"/> <uniform name="velocity.z" min="-1.5" max="1.0"/> <uniform name="velocity.angle" min="-2.0" max="3.0"/> <uniform name="size" min="5.0" max="7.5"/> <expr name="color.r" from="colorr" mul="1.0" max="1.0"/> <expr name="color.g" from="colorg" mul="1.0" max="1.0"/> <expr name="color.b" from="colorb" mul="1.0" max="1.0"/> <force y="-2.5"/> </particles> This is the one I tested with. <ParticlePlayerColor/> Should only be in the building template in simulation/templates  
    • I tried with it and nothing has been colored. Here is my particule file :  <?xml version="1.0" encoding="utf-8"?> <particles> <texture>art/textures/particles/red_lightning.png</texture> <blend mode="over"/> <!-- <start_full/> --> <constant name="emissionrate" value="150.0"/> <uniform name="lifetime" min="0.1" max="1.0"/> <constant name="position.y" value="0"/> <uniform name="angle" min="-3.14" max="3.14"/> <uniform name="velocity.x" min="-5.0" max="5.0"/> <uniform name="velocity.y" min="-5.0" max="5.0"/> <uniform name="velocity.z" min="-5.0" max="5.0"/> <!-- <uniform name="velocity.angle" min="-0.5" max="0.5"/> --> <uniform name="size" min="1.0" max="6.5"/> <constant name="size.growthRate" value="25.0"/> <expr name="color.r" from="colorr" mul="1.0" max="1.0"/> <expr name="color.g" from="colorg" mul="1.0" max="1.0"/> <expr name="color.b" from="colorb" mul="1.0" max="1.0"/> <ParticlePlayerColor/> </particles>    
    • Try with the dust texture ? Can you show your particle file ?
    • Ok I tried with this and it doesnt work, I think I didn't understand well the concept of drawing a texture without colors It seems like the code is working but the color of the player is not being attached /put to the particle color. The color of the particule doesn't change   
×
×
  • Create New...