Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
How do I implement these?

j9907
Registered User
Quote
2017-02-01 11:30:10

I have been messing with the trial of CC 5, and I'm impressed. It reminds me of 3D Rad, an engine which also didn't require coding, though Rad was more limited in what it could do and it didn't have any other platforms to export to other than a standalone Windows game.

Anyways, I was wondering if something like The Sims could be made in this engine? I've already "implemented" a thing in where when you are right next to an object (a sofa, in this case) a 2D overlay pops up, and when you click it, the character will rotate 180 degrees and will perform a "sit down" animation. Obviously this is flawed since you can easily be next to the sofa, but not necessarily "on" it, and the character will be sitting on thin air. I was trying to make it so you click on the objects, click the interaction you want to do, and then the character will walk towards the object and do what you said, but I can't figure it out.

Also: Is there any easy way to back up a project? I was stupid and didn't put all the assets into 1 folder, so some stuff is in 1 folder, and others are in some other one. Will I have to copy the assets to a new folder, label it, and then recreate the project with said assets?

Either way, I like what I'm seeing with this engine. I don't know how to code, but I know how to do other stuff and know my way around software so getting animations in the engine was a piece of cake (I use a combination of Mixamo, Fragmotion, and an FBX converter since Mixamo's FBX files don't work with Fragmotion).


ishmaru
Registered User
Quote
2017-02-01 21:23:56

Dude, I remember 3D Rad 2.1 back when it ran on DOS, and thats what attracted me to CC now.

One of the great things about CC is that with the exception of sounds, all models and textures, and even add-on behaviors and actions are saved in the .ccb project file (Though textures are compressed a little to save space) So theoretically as long as you have the .ccb file you should be good to go.

A rough sims game is very possible through actions alone, to really do something that complex, especially with lots of animations and movement involved, you may want to learn write your own behaviors in javascript.


j9907
Registered User
Quote
2017-02-01 22:30:37

Outstanding. That's so good to hear I'm currently messing with the actions right now and am trying to piece together something like the "buy mode" which the Sims games have... I'm currently having a hard time trying to find a way to make it so when you click on a 2D overlay, a new instance of an object will spawn and you can drag it around and place it... I see there are some extensions which allow the dragging of existing 3D models in the scene, but nothing which would handle the creation of a new instance:

EDIT: I found a way to implement buying objects and placing them into the world This engine is so intuitive! I love it


ishmaru
Registered User
Quote
2017-02-02 01:04:14

Nice good job!


j9907
Registered User
Quote
2017-02-02 20:34:11

Thanks! I'm currently trying to figure out how to set up a way to stop the character from being moveable when in the "buy mode" and remain that way until the player sets down an object. I'm also trying to think of a way to implement deleting objects from the scene. I'm guessing a variable can be made which is something like this:

variable name: pickedupsofa
value: 1
if pickedupsofa = 1 delete scene node sofa

The only issue I can see is wouldn't this delete every instance of the sofa if a player chooses to put more than one of the same sofa in the scene? I can't figure out the variables though.


ishmaru
Registered User
Quote
2017-02-05 06:10:57

Unfortunatly, its hard to use actions with nodes that are cloned while playing the game. This is due to the fact that you loose the context of that node. If your up for learning Javascript, there are ways to get the context of that node with the ccGetSceneNodeByName method.

If you don't want to use JS my best suggestion is this:

First Add a "on button press" behavior for the letter "D" on your character and have it set a variable "DeleteMode" to 1
Then Add a "on button press" for "ESC" and have it set "DeleteMode" to 0

Then on the Couch (Or any Deleteable object) add a "On clicked on Behavior" and then "If Variable is a Value" and Check to see if "DeleteMode" is equal to 1. If its 1 delete the current scene node, and set Delete mode back to 0.

Now If you press "D" and click on any couch it should delete that particular couch. and the escape key should cancel the delete mode.


just_in_case
Moderator
Quote
2017-02-05 06:58:22

ahhaaa.. @ j9907 You are doing it right But i can guess where you are wrong..
instead of putting so many sofa instance of sofa models..

why don't you use clone scene node method to use same sofa to create more instance of it...

for example

variable name: abc
if abc = 1 ( clone scene node sofa)

what to do with clone scene node:- change position of the scene node

set position type: anyone you want
change which scene node: Always use currentscene node (if you are working on the clone)

and all the properties adjust them according to your prefrences.

now if you execute your method.

variable name: pickedupsofa
value: 1
if pickedupsofa = 1 (delete scene node sofa )

now it will delete all intances of the scene node sofa... including the clones...


It will work for sure..
Hope you understand ..


j9907
Registered User
Quote
2017-02-05 09:28:25

@ishmaru I tried what you suggested and that didn't work for some reason. I can upload the ccb file, if needed. It's less than 3 MB.

@just_in_case That's actually how it's implemented. I have it where you press an overlay and a new overlay pops up on the top of the screen, you click the object you want to place in the world (currently only a sofa can be put in) and when clicked, it will make the second 2D overlay invisible and will execute the "clone scene node" which then makes a clone of a sofa which is placed in the world, but is invisible. It then uses the "Drag 3D object" extension and lets you place the object in the world. I'm currently just trying to find ways to implement all that I can without scripting, and will then start over and will use said knowledge to (hopefully) make a game which is like Sims 2, but I know that I won't make it exactly the same due to the complexity of such a game. The most difficult part I'm thinking will be a "Create a SIm" mode, in where you can make custom Sims. I'm thinking I'll just port the pre-made families / houses from the original and will simply let players play with those since I'm thinking CopperCube is a bit too "basic" to implement a system which lets players move their custom Sims into a vacant house to play.


ishmaru
Registered User
Quote
2017-02-05 15:28:02

@j9907 Sure I can take a look


j9907
Registered User
Quote
2017-02-05 17:56:33

Alright.


ishmaru
Registered User
Quote
2017-02-05 20:18:10

Changed it for you so you can see it in action:

(...)

Ok, Take a look at the behaviors I added to the couch and the HulaZombie. Also added 2D Overlay to indicate if delete mode is active.

The Keypress on the character toggles "DeleteMode" to 1(on) and 0(off)

On the Couch I altered your on clicked on behavior to first check if "DeleteMode" = 1. If it is it deletes the couch clicked on, If not it Mouse Drags the couch.

Also added a on mouse hover behavior which controls the toggle of the Delete indicator.

Hope that helps


j9907
Registered User
Quote
2017-03-17 13:10:33

I was wondering if something like Create-A-Sim could be done, as well? It involves creating a Sim (character) with clothes of your choosing and hair and stuff. Is there a way this could be done, in where you make a Sim and then the custom Sim will be transferred to a house? I'm thinking this is an absolute no, since there's no way for the engine to be able to animate a person who isn't already animated. I'm thinking of maybe porting the pre-made Sims which shipped with the game and just let players play them without customization or anything fancy. From what i can tell by the capabilities of CC, I won't be able to make it a full life simulator like the original Sims 2 is, which is fine. I'm doing this for fun.


j9907
Registered User
Quote
2017-04-25 14:14:27

wrote:
Changed it for you so you can see it in action:

(...)

Ok, Take a look at the behaviors I added to the couch and the HulaZombie. Also added 2D Overlay to indicate if delete mode is active.

The Keypress on the character toggles "DeleteMode" to 1(on) and 0(off)

On the Couch I altered your on clicked on behavior to first check if "DeleteMode" = 1. If it is it deletes the couch clicked on, If not it Mouse Drags the couch.

Also added a on mouse hover behavior which controls the toggle of the Delete indicator.

Hope that helps


Would you be so kind and remove the link to the project in your post? Thanks.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Int?rnational" (you are not logged in)


Text:

 

  

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


   






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