+ Reply to Thread
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32

Thread: [E2] Floating Info Texts

  1. #1
    Wire Amateur justbegon's Avatar
    Join Date
    Jul 2009
    Posts
    34

    Post [E2] Floating Info Texts

    Hi all,

    Is it possible to make Floating Info Texts made by E2?
    I often see floating text in gamemodes, like playernames and titles floating above players, "To buy this door press F2" in RolePlay.
    And I was thinking if this was possible in E2... It probably is, so therefor this request.

    It also would be very helpful debugging stuff, but also informing other players.
    It'll probably be serverside initialization and clientside texts (rotating to player view).
    I gues it wouldn't cause more lag then a wire_textscreen.

    Useful options would be:
    textCreate(Index:N,Text:S) :N
    textCreate(Index:N,Position:V,Size:N,Color:V,Font: N,Text:S) :N
    textpos(N,V)
    textString(N,S)
    textSize(N,N)
    textFont(N,N)
    textParent(N,E)
    textDelete(N)

    Thanks in advance,

    Sander[LMM] (justbegon)

    UPDATE:
    Its actually working. See this post.
    Last edited by justbegon; 02-13-2010 at 03:47 PM. Reason: Update
    A.K.A. Sander[LMM]

    Founder of the Conundrum OS.

  2. #2
    Ursus maritimus Drunkie's Avatar
    Join Date
    Feb 2009
    Location
    Canada
    Posts
    5,662
    Blog Entries
    1

    Default Re: [E2] Floating Info Texts

    No, these are not possible in E2, they are seperate addons. Totally un-related to wiremod.
    Unless there is a custom extension someone made, but isn't committed to official wire svn.

  3. #3
    Lifetime Supporter Nikita's Avatar
    Join Date
    May 2009
    Posts
    769

    Default Re: [E2] Floating Info Texts

    Has everyone completely forgot about info_text entity in source? Nothing is preventing us from simply spawning it and changing it's text with an e2 function.

  4. #4
    Wirererer Xandaros's Avatar
    Join Date
    Apr 2007
    Location
    Bremerhaven, Germany
    Posts
    364

    Default Re: [E2] Floating Info Texts

    Drunkie... if I understood he was requesting such an addon :O

    info_text... I'll look at that... sounds interesting

    But we should have a low limit... since it needs a sperate entity...

    Xan

    Edit: are you sure you didn't meant Point_Message?
    I love very poor avatars

    Quote Originally Posted by Dav1d View Post
    It's too big to copy all in one.

  5. #5
    Lifetime Supporter Nikita's Avatar
    Join Date
    May 2009
    Posts
    769

    Default Re: [E2] Floating Info Texts

    Oh yes, Point_Message is what I mean.

  6. #6
    Wire Amateur justbegon's Avatar
    Join Date
    Jul 2009
    Posts
    34

    Default Re: [E2] Floating Info Texts

    Thanks for replying so fast!

    I'm glad someone can read (!) and shows interest!


    I hope this can be realized.
    A.K.A. Sander[LMM]

    Founder of the Conundrum OS.

  7. #7
    billywitchdoctor.com Whosdr's Avatar
    Join Date
    Dec 2008
    Posts
    2,300

    Default Re: [E2] Floating Info Texts

    This gave me an idea to combine aimEntity and gpulib tool....
    .siht daer ot gniyrt emit detsaw ev'uoY

  8. #8
    Wirererer Xandaros's Avatar
    Join Date
    Apr 2007
    Location
    Bremerhaven, Germany
    Posts
    364

    Default Re: [E2] Floating Info Texts

    Okay, since this is easy, I'll start making this.

    Xan
    I love very poor avatars

    Quote Originally Posted by Dav1d View Post
    It's too big to copy all in one.

  9. #9
    Wirererer Xandaros's Avatar
    Join Date
    Apr 2007
    Location
    Bremerhaven, Germany
    Posts
    364

    Default Re: [E2] Floating Info Texts

    Update Bump:
    Code:
    //TODO: TODOs
    //TODO: Spellcheck
    
    local SpawnedTexts = 0
    local sbox_maxftexts = CreateConVar("sbox_e2_maxftexts","50", FCVAR_ARCHIVE)
    local E2Helper = {Descriptions = {}}
    
    E2Helper.Descriptions["fTextCreate"] = "Create a floating text at V with the string S and Radius N"
    e2function entity fTextCreate(string text, vector pos, number radius)
    	pos = Vector(pos[1],pos[2],pos[3])
    
    	if (sbox_maxftexts:GetInt() >= 0) then
    		if (SpawnedTexts >= sbox_maxftexts:GetInt()) then return end
    	end
    
    	ent = ents.Create("point_message")
    	if not ent then return end
    
    	ent:Activate()
    
    	ent:SetKeyValue("message",text)
    	ent:SetKeyValue("radius",radius)
    	ent:SetPos(pos)
    	ent:Spawn()
    
    	local phys = ent:GetPhysicsObject()
    
    	if (phys:IsValid()) then
    		phys:Wake()
    	end
    						//TODO: Something to the texts spawned by E2 disappear on removal and lowering counter    MAYOR!!!!
    
    	ent:Fire("Activate","",0)
    	return ent
    end
    
    E2Helper.Descriptions["fTextPos"] = "Resets the position of a Floating Text to V"
    e2function void entity:fTextPos(vector pos)
    	pos = Vector(pos[1],pos[2],pos[3])
    
    	if (!self.player:IsAdmin()) then
    		if (this:GetOwner() != self.player) then return end
    	end
    	if (!this:IsValid()) then return end
    	if (this:GetClass() != "point_message") then return end
    
    	this:SetPos(pos)
    
    	return void
    end
    
    E2Helper.Descriptions["fTextText"] = "Sets the Text of a Floating Text to S"
    e2function void entity:fTextText(string text)
    	if (!self.player:IsAdmin()) then
    		if (this:GetOwner() != self.player) then return end
    	end
    	if (!this:IsValid()) then return end
    	if (this:GetClass() != "point_message") then return end
    
    	this:SetKeyValue("message",text)
    
    	return void
    end
    
    E2Helper.Descriptions["fTextRadius"] = "Sets the Radius of a Floating Text to N"
    e2function void entity:fTextRadius(number radius)
    	if (!self.player:IsAdmin()) then
    		if (this:GetOwner() != self.player) then return end
    	end
    	if (!this:IsValid()) then return end
    	if (this:GetClass() != "point_message") then return end
    
    	this:SetKeyValue("radius", radius)
    end
    This is still early progress... I have no idea how to get it to lower the counter or simply remove the texts on E2 removal. The Limit is GLOBAL, but this is on purpose.
    It also needs further testing. I only checked the create function, if it works. I also don't know if the limit works, or if you can change the limit.

    Setting it to -1 should disable it.

    And this is were I don't wanna continue :P Have fun!

    Xan
    Last edited by Xandaros; 02-05-2010 at 09:25 AM.
    I love very poor avatars

    Quote Originally Posted by Dav1d View Post
    It's too big to copy all in one.

  10. #10
    has a custom title mattwd0526's Avatar
    Join Date
    Apr 2009
    Location
    Born Bostonian
    Posts
    2,652

    Default Re: [E2] Floating Info Texts

    This was suggested before I believe...

    Indeed it has: E2- 3d2d floating text

+ Reply to Thread
Page 1 of 4 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots