• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Items on map editor unmoveable ?

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
671
Hello, i've question:
Its possible to make in C++ an code :
If you put items on map editor - put it in map ex. chairs, lamps, weapons etc,
in game players cant move it... it possible to do it ?
Can anyone help me with this ?
 
Change in map editor, item atribute to "uid > 0" or add on item invisible tile = "nothing special" (but now, top item is a nothing special, not item).
 
Chev, i know but unique id is not repeatable, you can make me aID script for no-moveable ? please. :blink:
 
It's possible, duplicate uid's...

luascript.cpp
"This is basic function on tfs."
Code:
	if(m_globalMap[item->getUniqueId()])
	{
        if(item->getUniqueId() != 1000 ) // nomoved items
        {                                
    		std::clog << "Duplicate UId " << item->getUniqueId() << std::endl;
	    }	
	}
 
It's possible, duplicate uid's...

luascript.cpp
"This is basic function on tfs."
Code:
	if(m_globalMap[item->getUniqueId()])
	{
        if(item->getUniqueId() != 1000 ) // nomoved items
        {                                
    		std::clog << "Duplicate UId " << item->getUniqueId() << std::endl;
	    }	
	}

just put it in luascript.cpp or already have this line?
 
If you have "0.3.6pl1" your code have already:
Code:
if(m_globalMap[item->getUniqueId()])
	{
		if(item->getActionId() != 2000) //scripted quest system
			std::cout << "Duplicate uniqueId " << item->getUniqueId() << std::endl;
	}

So, you can duplicate uid "2000", without errors.

You can duplicate all uids, this is only warning in console...
 
Last edited:
Back
Top