Page 220 of 396
Re: Ask a simple question, get a simple answer
Posted: Mon Feb 19, 2018 2:46 am
by Wrathful
Hey Wrathful,
I usually start any GUI function/script with the following:
Thanks a bunch for the help akroma. Problem solved!
Wrathful
Re: Ask a simple question, get a simple answer
Posted: Mon Feb 19, 2018 8:27 am
by akroma222
Oh Wrathful ! ... I forgot to mention -
If you are drawing text / images from the onDrawAttackPanel hook,
Code: Select all
onDrawAttackPanel = function(self, champion, context, x, y)
you do NOT need to define or multiply anything (coords or measurements) with that "f" factor.
The x and y you are provided in that hook are already adjusted to account for screen resolution
Re: Ask a simple question, get a simple answer
Posted: Fri Feb 23, 2018 8:37 pm
by ColdDeadStone
Hello! It's time again for a simple question and maybe a simple answer! Maybe someone knows more about it:
I use a different camera for various things and obviously it was always coincidental that my Camera was always oriented to the North, so I've never had a problem... but now the Camera should look to the East and in a 45 degree angle downwards and that causes problems!
Code: Select all
spawn("mycam",party.level,14,20,1,6,"easttestcam")
easttestcam.camera:setFov(101)
easttestcam:setWorldRotationAngles(-45, 0, 0)
GameMode.setCamera(easttestcam.camera)
GameMode.setGameFlag("HideGui",true)
Now the problem is that when you set the rotation the Camera is pointing North again! The angle works like it should, but in the wrong direction. Every attempt to align the Camera to the East again will result in an angle of 0 again
hmm...
Any help or explanation is welcome! Okay thanks for reading... have a nice day!
Re: Ask a simple question, get a simple answer
Posted: Fri Feb 23, 2018 9:56 pm
by Isaac
Have you tried (0,-90,0)?
Code: Select all
easttestcam:setWorldRotationAngles(0,-90, 0)
*I don't know the specifics of your map, but -90 in the 2nd axis, rotates the camera to East for me.
___________
Code: Select all
spawn("mycam",party.level,15,15,0,0,"easttestcam"):setWorldPositionY(1.5)
increment = {0,0,0,0}
function spin()
easttestcam.camera:setFov(101)
easttestcam:setWorldRotationAngles(unpack(increment))
print(unpack(increment))
increment[2] = increment[2] -10
end
self.go:spawn("timer").timer:addConnector("onActivate", self.go.id,"spin")
GameMode.setCamera(easttestcam.camera)
GameMode.setGameFlag("HideGui",true)
**For anyone else running this script, you need to define a 'mycam' object first; usually put in objects.lua.
Code: Select all
defineObject{
name = "mycam",
baseObject = "base_floor_decoration",
components = {
{
class = "Camera"
}
},
}
Re: Ask a simple question, get a simple answer
Posted: Sat Feb 24, 2018 12:19 pm
by ColdDeadStone
Isaac wrote:Have you tried (0,-90,0)?
Code: Select all
easttestcam:setWorldRotationAngles(0,-90, 0)
No I didn't, but that's the solution... Quite simple... just:
Code: Select all
easttestcam:setWorldRotationAngles(-45,-90, 0)
Now, the Second zero explains why the Camera is always looking north...
Thanks alot for your help
Re: Ask a simple question, get a simple answer
Posted: Sat Feb 24, 2018 7:14 pm
by akroma222
Hey All,
does anyone have any suggestions on the best way to keep a real time record of which Weapon Sets each champion currently has active??
Ta! Akroma
Re: Ask a simple question, get a simple answer
Posted: Sat Feb 24, 2018 9:00 pm
by Isaac
akroma222 wrote:Hey All,
does anyone have any suggestions on the best way to keep a real time record of which Weapon Sets each champion currently has active??
Ta! Akroma
What is the exact intention?
Is this meant for creating a one-click—equip, weapon set?
Is this meant for tracking if it's a set? To detect an equipped weapon set, like a Katana,
and Wakizashi.
Or are you mimicking the original UI weapon-swap behavior in your own custom UI?
If it is this... I had some success with using more than one party component for inventory management. It let me put several items in a second inventory until needed, with no risk of them dropping on the ground in cases of a full inventory. I used this to swap the arbitrary equipped weapons & items in hand whenever a tiger form potion was used, and to restore them back, once the effect ended.
Re: Ask a simple question, get a simple answer
Posted: Sat Feb 24, 2018 9:17 pm
by akroma222
Isaac wrote:
Or are you mimicking the original UI weapon-swap behavior in your own custom UI?
If it is this... I had some success with using more than one party component for inventory management. It let me put several items in a second inventory until needed, with no risk of them dropping on the ground in cases of a full inventory. I used this to swap the arbitrary equipped weapons & items in hand whenever a tiger form potion was used, and to restore them back, once the effect ended.
More than one party component..? Second Inventory...?? Im intrigued
Im not sure if that's what Im after though, I only need to check what items are in what slots and then draw them accordingly (the normal inventory is hidden underneath)
I do need to be able to check which Weapon Set is active - for example - so I can switch / draw the hand slot frames properly
Re: Ask a simple question, get a simple answer
Posted: Sat Feb 24, 2018 9:33 pm
by AndakRainor
Hey! I did a shop GUI with switchable hand slots, mimicking the base GUI. That said I never found how to track if the hands set of the default GUI was set 1 or set 2. But is it really that important if you can switch them in your own GUI ? At worst the shown set number will be inverse when the player leaves the shop
Re: Ask a simple question, get a simple answer
Posted: Sat Feb 24, 2018 11:38 pm
by Mysterious
Hi all.
My mod is rather big and im using (4gb_patch) on the grimrock2.exe file so the Ram is increased to 4GB useage instead of what Grimrock 2 uses as standard. What I want to know is am I allowed to add the patched grimrock2.exe along with my mod? Or do I add the (4gb_patch) with my mod in the zip file?
Then if the later ill have to tell the user of my mod that they should make a back-up of their original (grimrock2.exe) and run the patch and then use the new grimrock2.exe.
PS: I don't want any copyright issues.