#1 2016-06-29 16:40:14

ifran
Member

Edit mode off

how to turn off edit mode in the configuration file ?
how to turn off gun in the configuration file ?
where and name config files ?

Offline

#2 2016-07-01 10:37:15

bobsimov
Member

Re: Edit mode off

you want to disable edit mode and remove the weapons and .. ?

Offline

#3 2016-07-01 11:25:21

ifran
Member

Re: Edit mode off

yes, i want to disable only edit mode and remove weapons
can you help me ?

Offline

#4 2016-07-03 23:39:03

chasester
Member

Re: Edit mode off

hidehud 0 or hudgun 0

the only way to stop editmode would be to turn it off in the source. But you could do.

stop_edit_mode = [ sleep 1 [ if (= $editing 1) edittoggle; ] stop_edit_mode ] ; stop_edit_mode;

basically you are doing a recursive check to see if the player is in edit mode, if they are then you tell them to leave :)

or you can just bind "e" " " this will stop e from calling the command edittoggle; though you can still type the command into the console.

chasester

Offline

#5 2016-07-07 13:21:01

bobsimov
Member

Re: Edit mode off

i would recommend you change the binding of the edit button to null and changing the weapon spawn checks to edit mode ; this way if edit mode does not exist , weapons wont too .

Happy coding :D (if you need help doing this , send me a mail : abdullahsaleh1599 AT gmail DOT com )

Last edited by bobsimov (2016-07-07 13:21:51)

Offline

#6 2016-07-07 15:18:24

chasester
Member

Re: Edit mode off

i would recommend just changing the source code. Its like a 2 min fix.

Offline

#7 2016-07-07 19:01:22

ifran
Member

Re: Edit mode off

I modified the surce code, it works.
Thanks

Offline

#8 2016-07-07 21:46:15

chasester
Member

Re: Edit mode off

you can do the same with the rest of the stuff you where trying to turn off. You could just check the game mode and if the modes not coopedit (m_edit) then just dont allow edit mode. Then just set up ur menu system to automatically set the mode to something other then edit. Or if you want something more exclusive:
create a debug variable #define ALLOWEDIT 0; then just do #if ALLOWEDIT
this would allow you to create an edit.exe and a game.exe allowing you to easily edit the game when you want to and then release a version that is not editable.

Offline

#9 2016-07-08 19:25:53

chasester
Member

Re: Edit mode off

Out of raw curiousity what kinda project are you working on?

Offline

#10 2016-07-09 09:29:09

ifran
Member

Re: Edit mode off

it is a project for the foundation for orphaned children.
scenario briefly
The hero in the third person looking for the key, and other artifacts of the puzzles to continue to the next level.
The game will be free
Is the engine Platinum Arts Sandbox, but the kids more like a version of Tesseract, due to the physics and shaders
I would like to modify the engine in order to adapt it to the needs of children - non violence

Offline

#11 2016-07-12 13:24:07

chasester
Member

Re: Edit mode off

Have you implemented Physics yet ? (or are you sticking with the static Z-Aligned physics in sauer/tesseract already)?

I would strongly suggest an outside physics library that way you can make puzzles more robust (things like swinging or moving platforms, edgeless safety cube, Weighted Storage Cube (portal :0) etc. )

chasester

PS: I wrote/help fix the bullet implementation for tesseract, so if you need help with that code, I can help.

Offline

#12 2016-07-14 10:26:04

ifran
Member

Re: Edit mode off

I would like implementation of Tesseract, Angel Script, and Bullet Physics.

Offline

#13 2016-07-15 01:19:34

chasester
Member

Re: Edit mode off

im still building the code but i can email you what I have so far its in a fairly volatile state. Though ive been updating it aggressively.

Offline

#14 2016-07-15 20:38:05

ifran
Member

Re: Edit mode off

is this fork is available on github ?

Offline

#15 2016-07-15 21:00:12

chasester
Member

Re: Edit mode off

no its not on git hub (i hate git hub) i may put it on svn (on source forge), but im still in a very prealpha state so having the code avaible is just gonna lead to a lot of problems down the line with people modding it and making 1000 different versions of a barely started project. If you want me to upload it somewhere I can, but I dont wanna make it a published work, due to the very infant state of the project.  Or I can just email you the source or I can create a private sourceforge svn and just add your user to the read list.

chasester

ps: If you wanna help contribute that would be awesome as well, any help would be appreciated :)

Offline

#16 2016-07-16 17:13:09

ifran
Member

Re: Edit mode off

if you want me to share this version please send me through the service Wetransfer
my e-mail: ifran@go2.pl

Offline

#17 2016-07-16 23:22:19

chasester
Member

Re: Edit mode off

I am transfering it now. I left defailed instructions on the installation. Just post if you have questions. If you are using a non windows computer then there will be a large amount of leg work to get it up and running. (mostly just building things with cmake).

newasent "scriptfilename" creates a controler of that type. nodeaddctrl "scriptfile" adds an additional controler to the same node. editnodeattr "propertyname" int(val), changes any int value (this will later allow for all primitives. If a node has 2 controlers with the same property name. It will change both controls properties.

All the other code is pretty much listed in the 3 script files (*.halo) blank object timespawner, Adding functionality to angelscript is done in wings.cpp (halo.h is the header for this file). CSerializer.cpp and *.h is where the serialization is done. Most of this is pretty easy to follow. Though keep in mind that nodes can not delete (mostly cuz i didnt add it into the binds). And if you change the properties of a ctrl then you will corrupt the controler and it will just show as a blank empty node. if this happens DO NOT SAVE. this will make the object unuseable, if you do this just use the command nodeaddctrl to fix it and readd it.

If you wanna see some examples load maps, PHYSICS_DEMO, PYRIMID_DEMO, and CHALENGE01. these are some simple demos on how to use the included ctrlers in game.

Player movement is volital at this state mainly cuz it will be moved to angelscript. to increase your speed type pspeed, jump height pjump, gravity Gravity.

When leaving editmode the map will not build into bullet (meaning that you are still in the old map before you edit mode) to fix just get back into editmode and leave. This is due to buildTriLevelCol is not called until you enter edit mode (just something I nv went and fixed).

F1 allows you to play with the game while in editmode, it moves at a superfast speed (im not 100% sure why, but all nodes are grabable and moveable so its good for debuging what whould happen if questions).

You will always spawn out of editmode back where you where when you entered. If you dont wanna then while in edit mode just hit "t" this will reset your player to where you are in editmode. Same if you fall off the map, (because you will not die) you will just fall forever. The manual command is restart_player.

The selection box is off and only grabs the top half of that side (again something I noticed and have not fixed). Its annoying but Its probably an easy fix in octaedit.cpp. So if it bugs you enough just fix it.

If you load a map and it gives you a runtime error its probably (like 99% of the time [id say 100% but if i did it would do it with out it being that]) due to a syntax error in your ctrler file. It should be fixed to just nullify that controler.,but just in case it fails to do that.

I think thats all the bugs/errors/quirks. If you find any more just post them or if you have questions about parts of the code, I strongly suggest not to play with the bullet code (in AJPhysics) or the serializer code (in CSerializer). These are very complex features and one little thing can lead to very wierd errors :) and you may not spot them at first.

chasester

PS: GL wish I had it in a more polished state for you still trying to work in the player as an script object before going in and fixing the editor and adding gui to the script editing.

Offline

#18 2016-07-20 04:04:36

ifran
Member

Re: Edit mode off

Thank you for sending your project files
Now testing scripts * .halo

Offline

#19 2016-07-30 18:36:12

Hypernova^
Member

Re: Edit mode off

Chase, is the source now available??? (you mentioned building on non-Windows OS) If so I'd really like to have it...
I haven't worked on my project in months due to classes, but I'd love to poke around and experiment in my spare time.

Last edited by Hypernova^ (2016-07-30 18:54:40)

Offline

#20 2016-07-30 22:16:41

chasester
Member

Re: Edit mode off

I have a source build that I can release, I would highly recomend waiting for a stable build before building anything substantial. I can email it to you, or add you to the members list on my sourceforge svn?

chasester

Offline

#21 2016-07-31 11:05:05

Hypernova^
Member

Re: Edit mode off

Wow that's great! I don't have a sourceforge acct atm, can you can email it to isaach23@runbox.com ? =)
I'm not planning to build a substantial project right now (when I have more time) but I'd like to poke around the source and existing stuff to see your work =)
Thanks!!!!

Offline

#22 2016-07-31 20:04:00

chasester
Member

Re: Edit mode off

Ya Ill email you a link, becuase I doubt that email can handle the file size. Ill include the source files, tho If i remember you are a linx guy so you will have to create the bullet and angelscript *.lib files on your own. (I asumme these are os dependent). Angelscript has most the major project files included in the source, and bullet obviously uses cmake.

If the program crashes 99.99999% of the time it is cuz of the serializer, the only reason it should crash is if you have an error in the module (scriptfile) that you are loading. This should only happen if you are loading a map (aka using the load part of the serializer). This is probably just a simple fix I just havent really invested the time cuz I want to restructure things in that file to help with the robustivity, so a more perminate solution will be applied on a later build.

Also if you change the name or order etc of your properties this will create an error when loading. SO Make sure to set your files before you save the map.

Few side commands:
newasent "SCRIPT" // this creates a new node with set script file attached, keep in mind that the scriptfile path must be fully stated (later this will be replaced with prefabs).

editnodeattr "PROPNAME" INT(VAL) // at the moment this only changes properties of the int value (due to some pointer magic, I will template the hell out of this to make it work for all types later. Keep in mind this will change the value of all controlers attatched to the selected node with set name.

nodeaddctrl "SCRIPTPATH" // this works exactly like newasent but instead of creating a new node it attatches the control script to the current selected node.

nodedel // this deletes nodes. This bind may not set right so you may have to rebind it. Most the commands just changed from ent to node.

rebuildmodule "SCRIPTPATH" //this rebuiilds the module (script file) that is stated. This works about 99% of the time, though some times the awake function doesnt allways reset properly when the map has been serialized so save and reload map to fix problem.

AS FILE

Any class inheriting from IController must have a private node @self; (@ is similar to * in c++, its basically a safe pointer). All other functions are optional

void Create() //called only one time when object is created (or added). Not called any other time;

void Awake()//called on the first frame of any reset (this means on map load or when exiting editmode (or calling editpause [do not call editpause directly])

void Update()//called every frame obviously

void Render()//called every time the object is in the render view (later it will be this right now its just every frame)

void Gui()//will later will be for hud elements.

void Destroy()//a deconstructor basically

99% of everything else is is to tell by looking at the code :)

I think thats it, I will compile the files and upload a download link for you with in the next day.
chasetser

Last edited by chasester (2016-07-31 20:05:03)

Offline

#23 2016-08-01 16:29:52

Hypernova^
Member

Re: Edit mode off

Awesome thanks. If I get to compile it, I can send you my cmake files if you want to include in your release.

Offline

Board footer