ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Feature requests and bug reports
forum topic indicator request to sven
person icon
swordmaster
Guest
Quote
2025-02-05 22:09:21

Sven would like to ask if you can create these actions and behaviors for free:

Action If a variable has a value, it would be the same action as Coppercube but with the options greater and equal than, less and equal than, different or not equal; The advantage of these extra comparison options is that they allow greater control with fewer events, example if variable weapon1 is equal one a weapon is visible, if variable weapon1 is not equal one to the weapon is invisible.

Vertex Color Action, this action allows you to change the color of an object in Coppercupe during the execution time, this action will allow you to create lighting maps for none ilumination or lightmap lighting option.

COLOR NODE OPTION ACTION, This option allows you to change the ambient color and emissive color of an object or all object material during the execution time, this option in the editor is in the part of Options of Irredit proprieties in material part, changing in these options the colors of Emissive Color You can change Dynamic Light's color and lighting options without the use of lamps, so you can then create a similar effect with Vertex Color, and the best than lights like point light will interact with the objects illuminating them too. Thus the action allows you to choose the environmental color and emissive color of an object if you only have one material or each material by the number of the material.

Light Option Action, this option allows you to change color options ambient color, diffuse color and specular color, attenuation, radius, outter cone, inner cone, falloff, if cast shadows and light type; among other Point Lights, Spot Light, Light directional options; I would like this action to feature the Irredit menu options in atribute part, that exists at CopperCube, allowing the exchange time to run the Point Light for Spot Light for example.

Comment action, this action is the same as performing JavaScript, but this action does not perform any script, it only saves comments for the developer to remember things in the project.

Thanks for your attention and if you can make one or any of these extensions for free I will be very happy and grateful, I have other interesting ideas but for now I do not want to abuse your goodwill, if you allow I will bring my others ideias for action and behaviors. Have one good week

person icon
guest_Guru
Guest
Quote
2025-02-06 03:59:44

I beleive all of these are available in the editor, there is also

[Url]https://vazahat.itch.io/coppercube[url]

This changes most of the attributes.

But i hope to see more by @sven, the more is better.

person icon
guest
Guest
Quote
2025-02-08 01:44:57

all good ideas for actions/behaviors. my suggestion is to learn to program your own... do a tut, bruv... here is one:

https://www.w3schools.com/js/def...

dont use let or const or you're a snob with no braains...

var butts = true;

if (butts) {
doPoot();

butts = !butts;
}

function doPoot() {
print("Poot tuah on dat thang!");
}

emoji icon_holy

person icon
Swordmaster
Guest
Quote
2025-02-19 17:44:13

I made this post because I didn t find extensions the make what I want in coppercube, the chance attributte from just in case, only affect ambient light from scene not from another things. About programming I tried somethings but I am not good in this.

person icon
swordmaster
Guest
Quote
2025-03-27 21:33:10

I see the seven will not answer my request, independent if is to make some extension or to polite refuse my request, than I make one new question. some one know how the script comand to change the vertex color of one node?
The script to change emissive light of one material from one mesh node, (this comand from irredit will only work in the mesh node with dinamic light)?
I saw this is problaby possible by read the documentation from coppercube api but I don t understant wet how to aply script comand to make these things happens in game runtime.
Thanks for attention

person icon
sven
Registered User
Quote
2025-03-27 22:34:40

Hi, i read this post when you posted it and i forgot about it sorry,

I dont quite understand the goal of :
**Action If a variable has a value
example if variable weapon1 is equal one a weapon is visible, if variable weapon1 is not equal one to the weapon is invisible.

{this can be done with built in action:
IF weapon1=1 THEN
show()
ELSE
hide()
}

**About Color stuff this is kinda over my head currently..

**About Comment action
Sadly i cant add similar input to the action as it is in execute javascript..
so my version will be limited with one line [or multiple single lines] that is kinda unreadable (i can still make this but its more pain than gain :D



/*
<action jsname="action_info" description="info">
<property name="i" type="string" default="---------"/>
<property name="i" type="string" default="---------"/>
<property name="i" type="string" default="---------"/>
</action>
*/

action_info = function()
{
}

action_info.prototype.execute = function()
{
}


to add more lines just copy <property name="i" type="string" default="---------"/>
and add it to the place where others are.

person icon
swordmaster
Guest
Quote
2025-03-28 00:14:03

Seven thanks for answer my post, About variable sorry, was mistake mine, I didn t saw the option not equal exist in coppercube, only not exist is equal and bigger than and is equal and smaller than.

About the comment action, I am little surprise, I thought that extension was to be more easy to make than any other because in my mind would be like copy or call the action execute javascript don t allowing no text execute code, and allow storage the text, but I understand you, thanks for explanation and lternative solution, I will test here.

About light this request is based in three things: vertex color, irrEdit - irrlicht material proprieties from one mesh node (can be static or dinamic mesh in dynamic light), and irrEdit - irrlicht proprieties light (specially point light).

I will explain first the vertex color, if you select one static or dinamic mesh with the none or static lighmap light option, and go in edit, modify selection, set vertex color you will apply one color over the the mesh, this color can be use to create lightmap or light effects, specially if use one color between black, gray and white, I would is one extension or script that allow
choose the color will apply during game runtime to create light effects without lamps, the basic vertex color propriety from coppercube engine to all mesh nodes is 64 (red), 64 (green), 64 (blue) (because the vertex color apply color based in RGB channel system is others words Red, Green, Blue channel colors.
For one extension or script I need to choose the mesh node, and the three values RGB to apply the vertex color to node mesh, If I want to clear the color vertex apply the values 64,64,64. About this system the just in case have the random vertex color plugin and haddoken have action CopperCube Fade To Vertex Color that allow change vertex color with transition in real time but this extension from him is paid.
I don t need the transition in real time, I only want to change colors to apply light effects in game to simulate one better light system and save memory from hardware.

About irrEdit - irrlicht material proprieties from one mesh node (can be static or dinamic mesh in dynamic light), to access this proprieties first you need go to tools, options and show irrEdit - Irrlicht options, apply this, go in view, show irrEdit - Irrlicht options, after this will open one menu in right side of coppercube editor
in this menu we have materials proprieties in material proprieties, if you select one static or dinamic mesh and apply dinamic light option, in irrEdit material options we can choose one material and change the color proprieties ambient, difuse, emissive and specular, In my tests in all engine versions I test, emissive can change the light proprieties of the mesh without lamp and create light effect near or equal the vertex color, but advantages of this method is two, first we can apply color in one specific material diferent from vertex color, in vertex color we apply color in mesh, and this color will affect all meterial and textures from that mesh; the second advantage of this method the model will be affect by light from lamps independent if is point or directional light. like vertex color I want to can change the color of emissive during the runtime of one game, for this in one script or action I need to select the node (static or dinamic mesh), choose the material to apply color and the three values from RGB color of emissive color to create light effect.
One interesting fact I didn t discovery why in some version of coppercube if I change the color of ambient of one node material, the coppercube will apply same effect of emissive color, but the ambient color only work in some coppercube versions, for don t have confusion the ambient color from IrrEdit will only affect the select mesh node, if you change the the ambient color from scene all objects with dinamic light option will be affect by light with color you had choose, all the mesh with none or static lightmap light will not be affect by the scene ambient light color.

About the point and d

person icon
swordmaster
Guest
Quote
2025-03-28 00:15:07

About the point and directional light, I was taking about the irrEdit - Irrlicht options, but in light node we change the attribute options, in point light we can change the color of ambient and difuse and apply change in light aparently in all versions from coppercube, but if you chance the ambient color of one point light, the point light will illuminate all mesh with dinamic light in all parts, if you change the difuse color you will only chance the area where the lamp is facing the mesh. about specular color I didn t discovery how to use. we have others proprieties that can change the area and intensity of point light, this proprieties is attenuation, radius, outtercone and innercone, falloff; but I don t pretend change nothing of this in runtime.
What I want is can change the ambient color and difuse color of one specific point or direction light in runtime, this way I need one action or script to select
point or direction light node and chance the three proprieties colors again from RGB channel from ambient color and from difuse color.

I don t know if will understand my explanation but if you test what I wrote in this post is very problaby, you will understand my ideia and possible aplications in runtime game made in coppercube.
Thanks the atention

person icon
guest_Guest
Guest
Quote
2025-03-28 07:33:14

I am not sure why you are not able to use JIC chnage attributes action, it works for vhanging color of point light it works for changing everything in realtime, it works with material properties also, so it works for irredit and irrlicht properites as well

person icon
swordmaster
Guest
Quote
2025-03-28 15:45:55

Guest, I tried the action change attribute from just in case, When I use the change attribute I was able to change ambient light color of one scene, but I didn t find way to change the ambient color of one mesh node (static and animated mesh), I tried to affect the emissive light IrrEdit material propriety from static mesh and from dinamic mesh using change attribute but I didn t find way to made work.
About point light, I didn t test change attribute in point and directional light, the reason is if didn t work to affect IrrEdit proprieties specialy ambient color of one specific node mesh, tha change attribute would only affect color light (difuse light) and radius of one point light.
About the action change attribute, there is two possibles answers about my case.
First possible answer the change attribute can not access and change the IrrEdit proprieties.
Second possible I didn t and I don t discovery yet how to use action change attribute to access and change IrrEdit proprieties; maybe there is some special way to acess these proprieties like the variables from internal coppercube behaviors.
Quest to answer these questions, there is only one way, test in you coppercube the action change attibute to try affect IrrEdit proprieties. If you discovery something please post what you discovery and if you have some good result, post how you make these result or results and I will try to make the same here in my coppercube.
About the power of IrrEdit - Irrlicht proprieties, I post this video to you understand why I want change in runtime of game some proprieties, this video wasn t made from me I only found in internet.

https://www.youtube.com/watch?v=lkGHBS0Z7BQ

In the channel of this person, there is one another video with name atomic heart, and in this video you can see the use of the IrrEdit proprieties in prototype
fan game.
Thanks the atencion

person icon
guest_guest
Guest
Quote
2025-03-28 20:09:42

@swordmaster

i wrote the random vertex color plugin years ago. not sure what it is exactly that you want. here's an action that sets the vertex color for the entire node (all buffers) or just a single buffer.
/*
<action jsname="action_SetVertexColor" description="Set vertex color">
<property name="Node" type="scenenode" />
<property name="SetAllBuffers" type="bool" default="true" />
<property name="BufferToSet" type="int" default="0" />
<property name="Color" type="color" default="ff404040" />
</action>
*/

action_SetVertexColor = function () {};

action_SetVertexColor.prototype.execute = function () {
var node = this.Node;
var colorValue = this.Color;
var bufferCount = this.SetAllBuffers ? ccbGetSceneNodeMeshBufferCount(node) : 1;
var startBuffer = this.SetAllBuffers ? 0 : this.BufferToSet;

for (var i = startBuffer; i < startBuffer + bufferCount; i++) {
var vertexCount = ccbGetMeshBufferVertexCount(node, i);
for (var v = 0; v < vertexCount; v++) {
ccbSetMeshBufferVertexColor(node, i, v, colorValue);
}
}
};


person icon
guest
Guest
Quote
2025-03-28 20:12:49

@swordmaster

also, if you can be more clear about what is you want, i am doing some coding today so let me know.

person icon
swordmaster
Guest
Quote
2025-03-28 21:42:06

Guest, I want if possible two actions, they are:

Action mesh node dinamic color (the name can another, is only for ilustration) - This action allow change the ambient color and emissive color from one specific material from one specific static mesh or dinamic mesh with dinamic light proprieties, from the IrrEdit - Irrlicht proprieties materials.
The proprieties to make in action is:
node to be affect (name of static or dinamic mesh)
material number (number of the material that will be affect, exemple the coppercube cube have one material, the 3d room made in coppercupe tool can normally have 2 or 3 differents materials depending if floor and ceiling use the same or diferent textures for their materials)
If possible material type, this is the material type each material from one mesh node will use (if is solid, transparent; the coppercube have numeric system to choose and apply the material type)
ambient color (exemple 255, 255, 255; the editor use the white color RGB channel how the basic proprietie)
emissive color (0, 0, 0; the editor use the black color RGB channel how the basic proprietie)

Action lamp color (ilustrative name, can be change the name of action) - This action allow to change the ambient color and diffuse color from one specific point light or directional light,from the IrrEdit - Irrlicht proprieties attributes.
The proprieties to make in action is:
node to be affect (name of light node)
ambient color (0, 0, 0; the editor use the black color RGB channel how the basic proprietie)
difusse color (255, 255, 255; the editor use the white color RGB channel how the basic proprietie)
If you want to add the others proprieties presents in IrrEdit - Irrlicht prorpieties atributes for light nodes will be one bonus, but for what I want node and colors will be perfect.

I don t know if you will understand my request but I tried be more clear possible in my explanation, about the action you did the can affect the vertex color, I will give the return after I test here, I decided write this post before test, to tell what I would like be made for coppercube.
Thanks the attencion

person icon
swordmaster
Guest
Quote
2025-03-28 22:13:44

Guest I test your action set vertex color and is perfect, do what I want, I tested speeded here but in all my tests at this moment the action work very well, thanks the action.

Sven I tested the action Info (the action you did in style from what I asked), The extension work well but I would like to know if is possible chance two small things in extension:

In the part where is write '' I '', is possible to me or another user of extension can write the name of commentary? If yes how? applying the same text code thing from the commentary part?
Is possible in the part of comentary add the system to open one text box to put the text with more organization?

Independent of anything thanks for the both (guest and sven) for read and help in my requests

person icon
guest_guest
Guest
Quote
2025-03-28 23:09:03

@swordmaster

let's just focus on the light node action first. the diffuse property in the irrlicht settings is the same as the color property in the scene node attributes. i can make an action to change that. the ambient, however, isn't exposed to the js api. it can't be changed with code. that said, you can fake it by changing the vertex color of the scene node exposed to the light, it just takes some messing around. ambient light can be changed globally on the root node only, apparently. the same will be true for your other action you wanted. do you want an action to change the exposed light properties? if you are banking on changing that ambient color for individual nodes, it won't work. emoji icon_sad


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |