[Mod] Portalgun V6.37 [portalgun]

zargulthewizard
Member
Posts: 249
Joined: Wed Jul 26, 2017 18:10
In-game: zargul

Re: [Mod] Portalgun V6.35 [portalgun]

by zargulthewizard » Post

Excellent!

Looked at the code and am subsequently hoping for portal frames soon! Maybe they work by setting their portal to the nearest player's name.

Long fall boots 3D_armor add-on would be great too.
May God be with you, always.

warpnarget
Member
Posts: 15
Joined: Sat Oct 12, 2019 21:34
In-game: warpnarget

Re: [Mod] Portalgun V6.35 [portalgun]

by warpnarget » Post

the portal gun won't put stuff back down

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Portalgun V6.35 [portalgun]

by AiTechEye » Post

warpnarget wrote:the portal gun won't put stuff back down
fixed :)
but now i believe this will mess in older mt versions instead

User avatar
BlockStar
Member
Posts: 23
Joined: Thu Jun 11, 2020 22:14
Location: The Dirty South

Re: [Mod] Portalgun V6.36 [portalgun]

by BlockStar » Post

This is an awesome and very fun mod. The problem for me is that--for my game (kind of a stealth-puzzler)--it is VERY overpowered. I had an idea to make it so that you could only shoot it at a certain type of block, and that block would only be available in certain places. So when I looked at the init.lua, I noticed this line:

if minetest.get_node_group(nname, "antiportal")>0 then

and thought maybe I could just flip the condition, like:

if not minetest.get_node_group(nname, "proportal")>0 then

That way, I could just assign a special block to the group "proportal", and then you could only shoot it at those blocks. But that gives me the error:

AsyncErr: ServerThread::run Lua: Runtime error from mod 'portalgun' in callback item_OnUse(): ...tuff\minetest-5.2.0-win64\bin\..\mods\portalgun\init.lua:581: attempt to compare number with boolean
stack traceback:
...tuff\minetest-5.2.0-win64\bin\..\mods\portalgun\init.lua:581: in function 'portalgun_onuse'
...tuff\minetest-5.2.0-win64\bin\..\mods\portalgun\init.lua:364: in function <...tuff\minetest-5.2.0-win64\bin\..\mods\portalgun\init.lua:363>

I don't understand why, but this is literally my first time messing around with lua (I just picked up Minetest about a week ago). Is there a way to do this?

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Portalgun V6.36 [portalgun]

by AiTechEye » Post

Code: Select all

if not minetest.get_node_group(nname, "proportal")>0 then
i think it should work but

Code: Select all

if minetest.get_node_group(nname, "proportal")==0 then
works better.

by the way i added this option in init.lua, set proportal_group_only = true and it works as you want it :)


https://github.com/AiTechEye/portalgun/ ... 3c0d885e74

User avatar
BlockStar
Member
Posts: 23
Joined: Thu Jun 11, 2020 22:14
Location: The Dirty South

Re: [Mod] Portalgun V6.37 [portalgun]

by BlockStar » Post

Wow, VERY cool! I haven't tried it yet, but am just so impressed that you created a whole new option. Thank you so much! Now I shall go get on it.

zargulthewizard
Member
Posts: 249
Joined: Wed Jul 26, 2017 18:10
In-game: zargul

Re: [Mod] Portalgun V6.2 [portalgun]

by zargulthewizard » Post

Would like to clarify some old posts, and add some.

Turrets currently have a bug that shoots at targets just to the side of what their aiming range should be. This is because in Minetest the center of a node is say 8.5 and not integral 8. This is the fix
zargulthewizard wrote:
Fri Apr 06, 2018 00:00
Add 0.5 to x and z in the detected object's position (I think it's named "a").
Using this mod in Minetest Mobile results in portals being shot straight ahead rather than at what the user is touching. This would be alright, except that mobile has no cross-hairs. Can anything be done about this?

The entity that this mod sticks the player to has some setting for visibility (i think something about "collision_bounds") that is turned on in the code. This makes it impossible to shoot portals downwards after flying out of one, however I have successfully changed this code without any apparent negative side effects.

The cake is a lie.
May God be with you, always.

rob123
Member
Posts: 109
Joined: Wed Mar 03, 2021 07:15
GitHub: qwerty123a2
In-game: joe and joergeg

Re: [Mod] Portalgun V6.37 [portalgun]

by rob123 » Post

This mod does not work any more.
If my post says something, it is a opinion and not fact unless i say something

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests