≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Treasure distribution 2
Posted by:
(you are not logged in)
Enter the missing letter in: "Internationa?"
(you are not logged in)
Text:
[quote][b]DouweDabbe[/b] wrote: I hoped the code would to be self explanatory. Developing Games requires tons of testing = boring work. Therefore made these 3 jewel distribution scripts, to add some event driven randomness. I am still struggling with debugging, therefore I have begun to use a naming convention: - node names first letter is nodetype: (m)esh, (o)verlay, etc. - variable names first letter is var type (g)lobal, s(tring), (i)nt, (f)loat, (o)bject, etc. I also like to bundle my data into (C-language like structs): var gPlayer { name : "", positionx : 0, positionz : 0, positiony : 0, points : 0 } PS: cant use ccbcommands in mygame.js files var Johnny = new gPlayer; // (g)lobal var var Peter = new gPlayer; this is beneficial if I need to pass aguments to some function var route = findPath(Johnny, Peter); attackPeter(Johnny, route); @just_in_case Yess it is very beneficial to create sample ccb files for every script, so the novice user can visualize and investigate its usage. will see to upload one. I did not experience CC crashes, But long Manna data strings (100 letters) do slowdown the square script quite a bit. all gems are cloned from prototypes in fLibrary (f)older node all gems are billboards, you can change that, names should be bGun-0, bLiquor-0, bDollar-0, idea was to use a auto numbering naming routine, not implemented yet. all gems are parented to fTreasure (f)older node. So we can iterate through fTreasure to keep scores, i.e. 4 of 12 monsters destoyed. Indeed this script is not just for distributing assets / jewels, but can also be used to place enemies or bad luck and traps as well. Hope that helps.[/quote]
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