I have a lot of object in my BGE environment. I can select them easily by using regular expression. All of them, also have action with specific name, too. Now I want to add them to my game, by python script. Is there any way to add actuator, controller and set action programmatically?
Is it (if at all) possible in Blender 2.6+?   If not, will future versions of Blender support it?  I see some old posts ( and ) saying that it is not possible. However, I found  referring to operators under  that allowed me to add sensors and controllers from python.  bpy.ops.logic.sensor_add(type='ALWAYS', object=my_obj.name) bpy.ops.logic.controller_add(type='LOGIC_AND', object=my_obj.name)   However I am not able to find any way to link them from python. I tried following (but did not work):  new_controller = my_obj.controllers[-1] new_sensor = my_obj.sensors[-1]   It throws AttributeError saying that object has no attribute 'controllers' :-/
I just made some minor edits to the text of .  I didn't edit the tags at all.  When I completed my edits, my edit showed as:    Now, I think those tags were present before I started my edit, and so were probably slipped in by the OP in their edit grace window.  I have no problem with that tagging, but I don't like seeing edits attributed to me that I didn't make.  So, what the heck? Link broken on desktop but work on nautilus file manger I created a shortcut to a text file called &quot;imp&quot; on right-clicking it from the default file manager everything works well. But on clicking it on the desktop I get this  Any Idea why? An awful lot of people seem to use the phrase "substitute X for Y" to mean "replace X with Y", while I've always used and understood it as "replace Y with X". This makes sense to me, given that a substitute is the replacement, not the thing which has been replaced.  I thought I might be able to figure things out from a dictionary, but now after seeing two sorts of definitions, I'm even more confused:   to put or use in the place of another to take the place of; replace   The first one suggests that the object will be the substitute (replacement), the thing put into place, while the second suggests that the object will be the thing which has been replaced.  Is one of these usages more correct in any sense? (I know this is probably a pointless question, since people will continue to speak the way they speak.) Is there perhaps a difference between American and British English?   And most importantly, is there any reliable way to tell what someone means when they ask how to substitute honey for sugar, or is the verb simply guaranteed to cause confusion? From official :     Due to a head injury, Cyclops is unable to shut off his optic blasts   at will and must therefore wear ruby quartz lenses to block the beams.   From the same page:     Cyclops possesses the mutant ability to project a beam of heatless   ruby-colored concussive force from his eyes, which act as   inter-dimensional apertures between this universe and another.   When his eyes are always blocked by ruby-colored beam of concussive force, how does he see? "would rather" + subject + past subjunctive What is the difference between:   The company would rather each employee be provided with ID card.  The company would rather each employee were provided with ID card. Isometric Embedding of a separable Banach Space into $\ell^{\infty}$ I am currently running a Dungeons and Dragons 4 campaign for a group of 9 players.  Whittling the group down to a more manageable size is not really an option since they are all family.  When we do combat it takes forever even if I have one player help me and allow them to go 2 at a time.  When we do story based adventure there are 2-3 players that do most of the talking and the others twiddle their thumbs.  I've tried encounters with many foes, encounters with only a few tough foes, dialog only encounters, social puzzle encounters, everything I can think of.  What else can I try to get this group more engaged? Newton's third law does not apply to the kinetic energy formula? Here is a classic problem:     A 60kg boy and a 40kg girl are sitting in front of each other on skateboards on a frictionless horizontal surface. The boy pushes the girl and the girl gains a velocity of 0.3m/s during the 0.5s the boys hand was in contact with her. What is the boy's resulting velocity?   Considering Newton's Third Law, the best way is to find the total force applied and rearrange the formula to find the boy's speed.  Newton's Law Method:  $F = m*a$  $a=\frac{0.3m/s}{0.5s}$  $F = 40kg * 0.6m/s^2$  $F = 24N$  Therefore the boy's speed will be:   $\frac{24N}{60kg} = a$  $a = 0.4m/s^2$  $v = 0.4m/s^2 * 0.5s$  $v = 0.2m/s$  Kinetic Energy Method:  $E_{k}=\frac{1}{2}*m*v^2$ the girl's kinetic energy  $E_{k}=\frac{1}{2}*40kg*(0.3m/s)^2$  $E_{k}=1.8J$  Since every action has an equal and opposite reaction the boy should have the same amount of kinetic energy.  $E_{k}=\frac{1}{2}*60kg*(0.2m/s)^2$  $E_{k}=1.2J$  As you can see, using Newton's Third Law, the kinetic energy was not the same. So what's going on here? I thought that in this case they should both have the same amount of kinetic energy due to Newton's Law. I must be missing something since there is more energy going in one direction than the other after meeting. My book used the first method as the answer and, well, it feels wrong. After my , I've now got a new suggestion: down votes should not have any side effect in meta.  By side effects, I mean something like banning me from asking questions due to too many down votes, which I am experiencing right now:     states that I am permanently banned unless I improve my standing by posting some quality answers.  Seriously, I'm new to the site, and thus I'm not capable of posting quality answers on Meta.  So my only refuge was to create a new account. I think this check for previously downvoted posts should be disabled on Meta. Is "reserved" an adjective or verb in this example? I need an answer about this sentence please:     We had a reserved seat.   Reserved in this sentence is a verb. I read that in a morphology book.  My question is: how does this become a verb?  I thought it was an adjective. So I had 20+ Pokemon on my account and today when I tapped on the app, it brought me back to the original screen when you first start playing. My friend who signed up tested using my username when she first started and my username was unavailable, meaning the account still exists. I don't have the password for the account, but I do have the email. So I wanted to know if it was possible to log back into an account? Possible bug in sidebar "question asked:" date I asked  yesterday, approximately 18 hours ago ("2011-12-13 20:24:03Z" according to the hover text), and it's still being displayed as "today".  I assume the "Z" in the timestamp refers to Zulu time, so I , and the date (2011-12-14) differs from the timestamp on the question.  I don't pretend to understand all of the complexities when converting time zones, but I thought it was strange enough to report. If it matters at all, I'm in US-Eastern. First: I'm obviously not talking about logging in and then automatically launching Terminal.app.  In , you used to be able to type &gt;console in the username field on the login screen and go directly into a command line terminal session.  I haven't done it in years until the other day. However, now, when I try it, my computer just locks up. I can't cancel, and it never sends me to a terminal session.  Is it even possible to do this anymore? If not, does anybody know when it was removed? It seems odd that typing &gt;console would cause the machine to lock up if it wasn't recognizing it in some way. How to fit a tight ellipse around nodes I have a set of two nodes and I would like to draw tight ellipses around them in my tikz picture. Note that this is part of a beamer presentation.    I have attached an image that illustrates the wanted effect.    Here is what I have so far:  \documentclass[10pt,aspectratio=1610]{beamer} \usepackage{tikz} \usetikzlibrary{shapes,arrows,backgrounds,fit,positioning}  \begin{document}  \tikzset{res/.style={ellipse,draw,minimum height=0.5cm,minimum width=0.8cm}} \tikzset{literal/.style={rectangle,draw,minimum height=0.5cm,minimum width=0.8cm,text width = 1.2 cm, align = center}}  \begin{frame}[fragile]{Example}{} \begin{tikzpicture}[node distance = 2 cm,auto, ] \node[res,] (obs1) {\footnotesize :obs1} ; \node[res, left = 1cm of obs1] (shop1) {\footnotesize :shop1} ; \node[literal, left = 1cm of shop1] (shopName1) {\footnotesize ``Barnes \&amp; Noble''} ; \node[res, above of = shop1] (book1) {\footnotesize :book1} ; \node[literal, left = 1cm of book1] (bookName1) {\footnotesize ``Dune''} ; \node[res, below of = obs1] (obs2) {\footnotesize :obs2} ; \node[res, left = 1cm of obs2] (shop2) {\footnotesize :shop2} ; \node[literal, left = 1cm of shop2] (shopName2) {\footnotesize ``Amazon''} ; \node[res, below of = shop2] (book2) {\footnotesize :book2} ; \node[literal, left = 1cm of book2] (bookName2) {\footnotesize ``Dracula''} ; \node[literal, below of = obs2] (measure2) {\footnotesize 12} ; \node[literal, above of = obs1] (measure1) {\footnotesize 7} ; \node[literal, right = 1cm of obs1] (monthName) {\footnotesize ``January''} ; \node[literal, right = 1cm of measure1] (yearNum) {\footnotesize ``2016''} ; \node[res, right = 1cm of monthName] (month) {\footnotesize :january2016} ; \node[res, above of = month] (year) {\footnotesize :2016} ; \node[res, below of = month] (day) {\footnotesize :date31012016} ;  \path[-&gt;,draw]     (obs1) edge node[midway,above=-6pt,fill=white,inner sep=0pt] {\footnotesize :shop} (shop1)     (obs2) edge node[midway,above=-6pt,fill=white,inner sep=0pt] {\footnotesize :shop} (shop2)      (obs1) edge node[midway,above=-6pt,fill=white] {\footnotesize :book} (book1)     (obs2) edge node[midway,above=-6pt,fill=white] {\footnotesize :book} (book2)      (book1) edge node[midway,above=-6pt,fill=white,inner sep=0pt] {\footnotesize :name} (bookName1)     (book2) edge node[midway,above=-6pt,fill=white,inner sep=0pt] {\footnotesize :name} (bookName2)      (shop1) edge node[midway,above=-6pt,fill=white] (title1) {\footnotesize :title} (shopName1)     (shop2) edge node[midway,above=-6pt,fill=white] (title2) {\footnotesize :title} (shopName2)      (obs1) edge node[midway,above=-6pt,fill=white] {\footnotesize :price} (measure1)     (obs2) edge node[midway,above=-6pt,fill=white] {\footnotesize :price} (measure2)      (obs1) edge node[midway,above=-6pt,fill=white]  {\footnotesize :date} (day)     (obs2) edge node[midway,above=-6pt,fill=white] {\footnotesize :date} (day)      (day) edge node[midway,above=-6pt,fill=white] {\footnotesize skos:broader} (month)     (month) edge node[midway,above=-6pt,fill=white] {\footnotesize skos:broader} (year)      (month) edge node[midway,above=-6pt,fill=white,inner sep=0pt] {\footnotesize :month} (monthName)     (year) edge node[midway,above=-6pt,fill=white] {\footnotesize :year} (yearNum)     ;  \begin{pgfonlayer}{background}   \node[fit=(shopName1)(shop1), fill=violet!30,ellipse] {};   \node[fit=(shopName2)(shop2), fill=violet!30,ellipse] {};   \node[fit=(bookName2)(book2), fill=violet!30,ellipse] {};   \node[fit=(bookName1)(book1), fill=violet!30,ellipse] {};   \node[fit=(measure1)(obs1), fill=blue!30,ellipse] {};   \node[fit=(measure2)(obs2), fill=blue!30,ellipse] {};   \node[fit=(year)(yearNum), fill=green!30,ellipse] {};   \node[fit=(month)(monthName), fill=green!30,ellipse] {}; \end{pgfonlayer} \end{tikzpicture} \end{frame} \end{document}   Here is the result that it produce    Note how the ellipses do not fit the nodes but cover much more. How can I create a tight ellipse around a pair of nodes? Error when using endfloat with unicode characters If $p$ and $q$ are distinct primes such that $p|c$ and $q|c$, prove that $pq|c$ Firstly, how do you gain the score exactly? I know it shows in the bar on the side of the map, but I remember a match where I was lone-wolfing and still got a pretty high score in that bar. I suppose my other squad members were together, but do I also gain for their work?  Also, does the score reset when I start a new game? I mean, I play support with the Offensive perk and it took me a long game of conquest to just unlock lvl-3 extra grenade. In the next match, that 'nade is gone. Don't I keep it forever? Pokemon Go login issues after update I downloaded the July 30th update for Pokemon Go and when I open the app I'm prompted to login, But once I login, it redirects me to this page on Cookies::     If I click "Done" in the top left, it prompts me to login again! I've tried reinstalling the game, restarting my phone, etc. I can't much enable Cookies on the inline Safari browser. It doesn't make sense, and cookies are on in Safari (because I don't use Safari and they're enabled by default).  How can I fix this? Offline update of Windows? What options, if any, exist for offline update of Microsoft  Windows?  If a solution exists please list your experience using it.    Background:  If for any reason a computer does not have a connection to  the Internet or the connection is too slow to download  several hundreds of megabytes every so often some kind of  offline Windows Update is required.  In a multi-computer environment a lot of bandwidth (and thus in some cases money) and/or  time could also be saved if it is possible to update in an  offline manner. Prove the equality of circle's areas Through a random point inside the circle, we draw $4$ lines with $45$ degrees between each other. Prove, that the total area of odd pieces, equals total area of even pieces.    I suppose there is a solution using integrals, but maybe there is geometric solution as well.