Can Somebody please Help me ? Scriptbrains needed :D
hi again,,, i knew you want to puke reading the title,,,
yeah,,, i need help from somebody, that,,, well,,, Have Scriptbrains,,,
i want to slowly learn lua scripting,,, maybe want to provide me easy sources or information ???
i confuse to learn it by myself,,, i want to learn and want to quit learning if it so troublesome for years and i still can't do it,,, (the years is also a variable ,,,
for what you say ?
for yeah,,, creating a script (mission/multiplayer),,,
the name still been secret under FBI's overwatch,,, so ? don't ask it for now let me know to do it first :DDD
ok then,,, you have know why i make this troublesome post right ?
then please comment below this, or JUST SAY ANYTHINGS There,,,
--- FIRST PART : "Basic Quantumic"
- How to Start it ??? "Going outside my house"
- Basic Knowledge ??? "I want to walk in the park"
- Examples ??? "Rabbit for our lab ???"
- First Step ??? "not to the moon though"--- SECOND PART : "The Deployment"
- What i do now ??? "Sit there, wait someone do it"
- How can i do IT ??? "Basically,,, try"
- How to Check ??? "Advanced,,, read"--- NEW WORLD OF SCRIPTS !!! : "The Life"
- Please Help by answering, comment, critic, or explain my question )
- I ASK YOU GUYS IN THE COMMENT PART,,, THANKS
- Further things should be in the comment part ^^--- Unknown Part,,, "Still in Outer Bound of my Tiny World"
thank you for helping or response to this post :DDDDD
( please warn me to stop XD )
|{
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜
Are you a noob Ultimaxuseless ???
ASK MR.GOOGLE !!!
THAT ! THAT IS THE SOLUTION !!!
( im not helping myself here :'( ,,,)
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜
I didn't try LUA scripting yet, but if you want to learn it, you could look at how other scripts work and experiment with them.
There's also some documentation, with brief explanation on how it works and what can you do: http://hedgewars.org/kb/LuaAPI
My themes / Theme Editor / Code contributions /
Dank
You not scripting using LUA ???
that is very surprisingly turn the table from what i was thinking before
nvm,,, my mind never right
what that other scripts ??? :/
---
btw,,, thanks for the starting
but there is no restriction to comment another starting point guys ^^
( have i say guys ??? )
|{
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜
Writing scripts for hedgewars is easy (The hardest part is just to get something to work!).
Ill write how ull do it in a few steps:
1. Create the folders:
~/.hedgewars/Data/Scripts/Multiplayer (Linux)
~/Library/Application Support/Hedgewars/Data/Scripts/Multiplayer (OSX/Mac)
My Documents/Hedgewars/Data/Scripts/Multiplayer (Windows)
2. Create a file called myscript.lua (you can change the name later to something u like)
-> in windows, it *can* be hard to create a file with that extension, so its possible to create that file using "save as" in notepad or something.
3. In that file add:
**For Windows users: Dont use MS Word, or Wordpad to add the content. Maybe it works, maybe ... I recommend notepad or notepad++.
4. Run the script by selecting *myscript in the game!!!
To achieve whatever u want, then just sneak into other scripts and see what they have done :P. More info about functions and such can be found here: http://hedgewars.org/kb/LuaAPI (as KoBeWi wrote).
For Linux users, do everything with:
Added that just for fun
Good luck!
Vattenania, my beloved motherland, my beloved homeland! You are always with me in my thoughts and in my heart!
My themes / Theme Editor / Code contributions /
Dank
here's a very good tutorial site: http://lua-users.org/wiki/TutorialDirectory
My stuff
I Use Notepad++,,, i almost use GIMP XD
ah,,, downloaded ! shoot !!! Notepad++ get ignored ;/ ,,, i will install it,,,
Woa !!! its big !!! long way to finish the read though XP
---
And VERY THANKS So much guys ^^
seriously,,, its Full Respect Thanks So Much with a valid @Nexus_rule_#2170023-2043th verified licence about #2170023 thanks rule ^^
i'll try to use all of them C;,,, chance to write/typing NEW HISTORY Of the Great UltiMaxKom (is "Great" meaning "Dumb" ???)!!! (another weirdness,,, lol)
and i move to part two,,,
|[
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜
Remember when I suggested you to check other scripts?
I just managed to modify one of FaTony's scripts and create my "own weapon". You could try this too, if you get familiar enough with LUA. Experimenting is one of the best ways to learn.
My themes / Theme Editor / Code contributions /
Dank
Please Applause to this dude guys !!!
Thanks and nice to say ; "... Experimenting is one of the best ways to learn." and as i know,,, Experience is the best teacher in the world for all the time tho
ok then,,, as you know,,,i working on A Project codename "The Dead" ,,, and its SCRIPTS (Include,,, and many complex aspect too),,,
}[
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜
Hey guys
I have question please ^^
Q : How to "Change The [Damage Percent] (like in schemes costumization : Damage Percent) ??? But guys,,, i mean, when after i set the initialization of [onInit] event,,, i want to change the Damage percent again ,,, but i try it and can't,,, please help or explain what happen,,, maybe this can be my mistake ;/
Thank you for reading and even response this little question
]{
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜
DamagePercent can only be set on initialization. However, there's one hack you could try. There's a method that can set multiple values of a gear, including damage. So the idea would be to change the damage of each gear that is created. It could look like this:
My themes / Theme Editor / Code contributions /
Dank
Damage tracks damage *to* a gear, not damage inflicted by it.
Unless you're trying to reduce damage to an object?
https://hg.hedgewars.org/hedgewars/file/f6d33710baff/hedgewars/uGearsList.pas#l220
"Boom" would be the one that lets a script mess w/ the damage dealt.
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
I Quite still don't understand :S
About "Boom" ;/
i want to "Change Damage Output of Hog" ... or sounds like "When THIS HOG Take turn,,, the hog attacked by it get more damage, like Extra Damage" ... or mb yes, reduce too,,, and increase... Simply, change Damage Output/Input to Hog except in "onInit" event.
OK ! I Have ask sheepluva but she (?) tell me to ask nemo for this ( she say nemo smarter than her XD ,,, and i think that not true (Devs should be a horizontal title)) ...
She give some way but it still not clear...
Maybe this case should be closed ? it kinda "Dead End" to my question ? i think it still has alternatives though,,, i thinking it later
]{
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜
Ok then,,, if that one was done,,, i got another :X
this :
Yeah,,, that quite a lot for me,,,
BUT REMEMBER !!!
I WILL REPEAT THIS MOVES WHEN I GOT NEW QUESTION OR FEEDBACK !!!
I Mean,,, i use that quote with different content inside,,, so please be know and not annoyed at it,,,
im done asking some little question and feedbacks...
][
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜
Ulti, after our little chat today, I went to see if there's some way to fix the damage popups when you "deal" the damage yourself.
And I found a small problem and a bug.
First, there's a visual gear called vgtSmallDamageTag, which is the one that pops on hedgehog damage. However, there's no such function as onVisualGearAdd, and normal onGearAdd doesn't seem to detect visual gears.
Second, when you try to create the vgtSmallDamageTag yourself, the game crashes. I dug into game's source to find the cause of this, and I found a procedure called AddDamageTag. It creates the tag and then creates and appends texture. Which means that when you add it manually, it doesn't have texture, thus the game crashes when trying to draw it.
To sum up, hijacking damage tags and changing their value (or removing and adding yours) would probably work for what you want to achieve, but it's impossible right now. I'll see if I can do something to allow this (no promises though).
My themes / Theme Editor / Code contributions /
Dank
I got what can be work in this problem
After i talking to Sheepluva yesterday after we talking (this timezone things a bit confusing @_@)
I asking her for a Long-Midnight-Scripts-Story about this (too)
And the answer was an alternative,,, and that really familiar with yours.
Btw,,, i have same idea as you . before we found nother path.
by using
vgtHealthTag
we create it with
AddVisualGear(x, y, visualGearType, state, critical)
(not addGear though)
[kb]
i have check in other scripts that use it,,,
like Sheepluva ask me
and most use it XD (like Mutant, Contimental, Battalion, etc)
then i realize that the state should be gst# (see Gear State) but in those scripts use it, the state was a sort of integers, i ask sheepluva and she say that 0 is nil value for the state, yeah,,, i later try something, and i realize again that the state for vgtHealthTag (each/some vgt# has its own specific things) is the number will be shown,,, so it is number though...
then i try to use it,,, the result is good,,, like this how i use (maybe a bit different ;/) :
e.g if i want to show 172 damage to Hoggy H :
AddVisualGear(GetX(Hoggy H), GetY(Hoggy H), vgtHealthTag, 172, true)
then this case have melted,,,
function onGearDamage(gear, damage)
if GetHealth(gear) - damage > 0 then
local BonusDamage = 0
BonusDamage = (damage) * 0.2
SetHealth(gear, GetHealth(gear) - BonusDamage)
AddVisualGear(GetX(gear), GetY(gear), vgtHealthTag, BonusDamage, true)
end
end
BUT HEY !!! Idk how to write function like you guys D;
ok then,,, thanks everybody ... and sorry for asking silly question ;/ (if it is)
]{
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜
Your solution with vgtHealthTag is viable, HOWEVER it still can be improved. It's still confusing when you see multiple numbers on hedgehog damage and only one is actually real.
I checked if I can do something about it, and I managed to add some functions to allow for deleting/changing visual gear on creation. And it's totally possible to remove all unnecessary number popups and leave only the ones you created. If everything goes well, this option will be available for you in Hedgewars 0.9.23
My themes / Theme Editor / Code contributions /
Dank
Ok ,,,
Btw, i make the Damage Popups with different place and different colour
though, i is very epic for Popups Type
There are 4 Different Damage type with its own effect and colour and place,,,
maybe it still good for now ...
GL With v0.9.23 Contributions ^^
]{
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜
Guys !!!
Got another Question !!!
?_6 : [CAN AND HOW?] Stop an exiting specific played sound ? or theme music can be stopped ? or can i pause SFX ? Any ???
?_7 : [CAN AND HOW?] To add score after a match to scoreboard within local or even global (in record here) that the player itself can check its own score ??? and can this be automated for writing the new score ??? or at least,,, how to save the score after a match ??? or ANY alternatives...
?_8 : How to Spawn hog that will perfectly above the landmass but not too high and not be spawned inside the terrain itself ??? or how to spawn crates lke that ??? these is random place that NOT Inside the terrain and one more +NOT ABOVE OR BELOW WATER,,, so the gear land PERFECTLY ??? or any Solution or alternatives ???
Can someone bring me the answer please ??? thank you for paying attention ^^
]{
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜
Use ShowMission to show the in-game scoreboard (which then can be displayed by pressing ESC). It can't be really automated though, you need to update the scoreboard each time you want it to change.
SendStat function is used for stats after match.
(check their API for description)
My themes / Theme Editor / Code contributions /
Dank
Ah ...
Right,,, hmmm,,,
But OMG !!!
I Write like some donkey searching their tail,,,
REALLY XD
I Wrote WRONG Question (i mean,,, wrong word to show expression of my true question)
I rewind <<
?_7 : To Add Score LIKE "Trophy Races" THAT SEND THE RESULT TO "Records" in "Hedgewars.org" [http://www.hedgewars.org/records] ??? and automatically do that,,, or if it can't, then at least we can RECORD IT On locally of player's computer,,, mean to be "Scoreboard" and "Rankings" through all modes Player,,, ["Hope this one right D:"] ,,, AND ! This USE LUA SCRIPTS METHOD ... Not Manually... ty
But KoBeWi 100% RIGHT AND I THE WRONG,,, No Off really srly,,,
If can,,, please re-answer it,,, sorry, my bad :C
]{
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜
One Another Little Question :
?_8 : [HOW?] To know "is the game is end" , i mean, check the game is ended than sendstat for ONCE to EACH TEAM at the END OF THE GAME,,, But idk "How to know WHEN The Game wll Ended" cuz this is not a training mission...
thank you for reading and more thanks for answering
]{
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜