InitInventorySlots()
is called on button press from c++, but i did not realize that I need to place the items relatively Thanks for opening my eyes Search found 85 matches
- 2012-02-29, 08:59
- Forum: Coding and Scripting
- Topic: GUI: dynamically created
- Replies: 4
- Views: 15427
Re: GUI: dynamically created
AH, oh my god, just found it:
- 2012-02-28, 13:49
- Forum: Coding and Scripting
- Topic: Help for the Start - 3rd Person view
- Replies: 12
- Views: 28479
Re: Help for the Start - 3rd Person view
The Bigger Post above is the complete changelist i did... This is enough to make a real 3rd Person view.
- 2012-02-28, 13:37
- Forum: Coding and Scripting
- Topic: Cursor ingame
- Replies: 15
- Views: 51096
Re: Cursor ingame
But still the mouse movements are not forwarded to the GUI. Any Ideas? Or is there even a better way to lead all events from the interactive gut to the game? Sorry, I fear you're losing me here... If I understand you right, you have a "Chat" type GUI active and open which is consuming the mouse eve...
- 2012-02-28, 12:17
- Forum: Coding and Scripting
- Topic: GUI: dynamically created
- Replies: 4
- Views: 15427
Re: GUI: dynamically created
For sure I can :) Inventory_init.cgui InvBg = gui:new("WindowT", "InvBg"); Inventory = gui:new("WindowT", "Inventory"); gui:SetRootWindow(InvBg); -- Setup the window hierarchy. -- *************************** InvBg:AddChild(Inventory); -- Initialization of the window contents ("constructor code"). --...
- 2012-02-27, 19:43
- Forum: Coding and Scripting
- Topic: Cursor ingame
- Replies: 15
- Views: 51096
Re: Cursor ingame
A few hours of hacking later i found out that I can use Keyboard events when I change in ClientStateInGame.cpp:847 from if (ActiveGui->GetScriptName() == "" && WasLMBOnceUp) to if (/* ActiveGui->GetScriptName() == "" &&*/ WasLMBOnceUp) and comment out the ActiveGui completely. It's an evil hack, but...
- 2012-02-27, 17:45
- Forum: Coding and Scripting
- Topic: GUI: dynamically created
- Replies: 4
- Views: 15427
GUI: dynamically created
Hi @ll, I am trying to create an inventory with a variable Number of Slots. So I tried to realize this using the following Code: function InitInventorySlots(SlotsCnt, ...) Inventory.SlotsCnt = SlotsCnt; end function Inventory:OnActivate() local i = 1; local ItemsPerLine = 5; Slots = {}; for i = 1, s...
- 2012-02-27, 13:58
- Forum: Coding and Scripting
- Topic: Cursor ingame
- Replies: 15
- Views: 51096
Re: Cursor ingame
Okay, i have now tried it out, but on the one Hand, when I use interactive GUI I cannot use the keys to move around, and on the other hand when I use a non-interactive GUI, The Camera still moves with the mouse. And I want to acieve the camera moving only on LMB down while moving. So I think i might...
- 2012-02-27, 13:09
- Forum: Coding and Scripting
- Topic: Changing EntityStateT for flexibility
- Replies: 8
- Views: 24513
Changing EntityStateT for flexibility
Hi @ll, I was reading through the code and I thought if it would be helpful to change the engine code to make the EntityStateT independent from the Engine. Every game has other Options and so it makes not very much sense to hardcode the EntityStateT Options into the Engine code. So i thought about c...
- 2012-02-27, 03:26
- Forum: Coding and Scripting
- Topic: Cursor ingame
- Replies: 15
- Views: 51096
Re: Cursor ingame
I think this might be a good idea, but in the game I want to use the Cursor to interact with World Objects. So is the cursor bound to the gui or is there a possibility to get if the cursor touches an entity?
- 2012-02-27, 03:19
- Forum: Coding and Scripting
- Topic: Help for the Start - 3rd Person view
- Replies: 12
- Views: 28479
Re: Help for the Start - 3rd Person view
This is some Kind of weird, I did the "Proper" fix first, but it changed nothing. Then I entered the console-command to turn off prediction and ended up with scrolling does nothing at all... Any other Ideas? here is my code snippet for the catching of the mousewheel event, the rest of my code is alr...
- 2012-02-25, 18:05
- Forum: Coding and Scripting
- Topic: Help for the Start - 3rd Person view
- Replies: 12
- Views: 28479
Re: Help for the Start - 3rd Person view
So again I tried and managed to add the PlayerCommand to change the camera distance on mousewheel and in HumanPlayer.cpp I added // Update Camera Distance State.CameraDistance += PlayerCommands[PCNr].DeltaCameraDistance; Which definitely works (I tried with console output), but every second tick it ...
- 2012-02-25, 15:54
- Forum: Coding and Scripting
- Topic: Help for the Start - 3rd Person view
- Replies: 12
- Views: 28479
Re: Help for the Start - 3rd Person view
Hi, I managed to encapsulate the trick :) BaseEntity.hpp:56 float CameraDistance; // Distance from camera to model BaseEntity.cpp:53ff EntityStateT::EntityStateT(const VectorT& Origin_, const VectorT& Velocity_, const BoundingBox3T<double>& Dimensions_, unsigned short Heading_, unsigned short Pitch_...
- 2012-02-25, 15:42
- Forum: Coding and Scripting
- Topic: Cursor ingame
- Replies: 15
- Views: 51096
Re: Cursor ingame
Okay, now I have had this Idea: - the crosshair is my cursor, the graphic is already changed. What I try to achive now is, not to move the camera when i move the mouse, but to move the "crosshair" around. Can you give me a hint, I have tried to figure out where the mouse moving event "lands" in an a...
- 2012-02-24, 15:33
- Forum: Coding and Scripting
- Topic: Cursor ingame
- Replies: 15
- Views: 51096
Re: Cursor ingame
Thanks alot, i Understand the theory now, perhaps I will manage to do this on the Weekend
- 2012-02-23, 15:37
- Forum: Coding and Scripting
- Topic: Help for the Start - 3rd Person view
- Replies: 12
- Views: 28479
Re: Help for the Start - 3rd Person view
So the 3rd Person view works very well! I think the changes in the engine may be exported very easily.
I will also chance the EntityStateT to define the camera positions from inside here.
So the topic is fulfilled I understand the code now
THANKS ALOT!
I will also chance the EntityStateT to define the camera positions from inside here.
So the topic is fulfilled I understand the code now
THANKS ALOT!